]> granicus.if.org Git - clang/commit
Add basic (noop) CodeGen support for __assume
authorHal Finkel <hfinkel@anl.gov>
Wed, 16 Jul 2014 22:44:54 +0000 (22:44 +0000)
committerHal Finkel <hfinkel@anl.gov>
Wed, 16 Jul 2014 22:44:54 +0000 (22:44 +0000)
commite85f0ef7d5e72b33fbeda1e91f4b6ea84cafb302
tree214167e522eeda33fe739ad7ee7d32547cf05a12
parentcb743254ce3efc0883e4f4a91ab64614bfce18cd
Add basic (noop) CodeGen support for __assume

Clang supports __assume, at least at the semantic level, when MS extensions are
enabled. Unfortunately, trying to actually compile code using __assume would
result in this error:

  error: cannot compile this builtin function yet

__assume is an optimizer hint, and can be ignored at the IR level. Until LLVM
supports assumptions at the IR level, a noop lowering is valid, and that is
what is done here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213206 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBuiltin.cpp
test/CodeGen/builtin-assume.c [new file with mode: 0644]