[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-05 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. Ah right. Thanks for looking. LGTM. -eric https://reviews.llvm.org/D33721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 101427. fhahn marked an inline comment as done. fhahn added a comment. use else if https://reviews.llvm.org/D33721 Files: lib/Basic/Targets.cpp test/CodeGen/arm-target-attr.c Index: test/CodeGen/arm-target-attr.c

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-04 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Basic/Targets.cpp:5444 +Feature = "-thumb-mode"; + if (Feature.compare("+thumb") == 0) +Feature = "+thumb-mode"; This can be "else if". https://reviews.llvm.org/D33721 _

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: lib/Basic/Targets.cpp:5439-5442 +// [-|+]thumb-mode target features respectively. +std::vector UpdatedFeaturesVec(FeaturesVec); +for (auto &Feature : UpdatedFeaturesVec) { + if (Feature.compare("+arm") == 0) --

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-01 Thread Eric Christopher via Phabricator via cfe-commits
echristo added inline comments. Comment at: lib/Basic/Targets.cpp:5439-5442 +// [-|+]thumb-mode target features respectively. +std::vector UpdatedFeaturesVec(FeaturesVec); +for (auto &Feature : UpdatedFeaturesVec) { + if (Feature.compare("+arm") == 0) ---

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-01 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 100994. fhahn added a comment. Agreed, ARMTargetInfo is a much better place to do the conversion! Moved attribute conversion to ARMTargetInfo::initFeatureMap. Unfortunately FeaturesVec is const, so creating a mutable clone seemed the most straight-forward thi

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-05-31 Thread Eric Christopher via Phabricator via cfe-commits
echristo added inline comments. Comment at: include/clang/Basic/Attr.td:1790-1794 +// target features respectively. +if (Feature.compare("arm") == 0) + Ret.first.push_back("-thumb-mode"); +else if (Feature.compare("thumb") == 0) + Ret.fir

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-05-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 100880. fhahn added a comment. reworded comment and improved test case to ensure only a single thumb-mode attribute is added. https://reviews.llvm.org/D33721 Files: include/clang/Basic/Attr.td test/CodeGen/arm-target-attr.c Index: test/CodeGen/arm-targ

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-05-31 Thread Javed Absar via Phabricator via cfe-commits
javed.absar added a comment. Comment at: include/clang/Basic/Attr.td:1774 + +// Convert GNU target names for arm and thumb to thumb-mode target +// feature. Would this be a more accurate comment: "...arm and thumb to thumb-mode" => "arm and th

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-05-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. Herald added subscribers: kristof.beyls, javed.absar, aemerson. This patch adds support for the target("arm") and target("thumb") attributes, which can be used to force the compiler to generated ARM or Thumb code for a function. In LLVM, ARM or Thumb code generation c