Commit Graph

5 Commits

Author SHA1 Message Date
Michael Kuperstein 9d0cf0b63f HasSideEffects() should return false for calls to pure and const functions.
Differential Revision: http://reviews.llvm.org/D8548

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234152 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06 13:22:01 +00:00
David Blaikie 1d7abba8db Update Clang tests to handle explicitly typed load changes in LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230795 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-27 21:19:58 +00:00
NAKAMURA Takumi 0e59cbece8 clang/test/CodeGen/builtin-assume*.c: Fixup for -Asserts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217352 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-08 01:12:55 +00:00
Hal Finkel 687b32ee47 Add __builtin_assume and __builtin_assume_aligned using @llvm.assume.
This makes use of the recently-added @llvm.assume intrinsic to implement a
__builtin_assume(bool) intrinsic (to provide additional information to the
optimizer). This hooks up __assume in MS-compatibility mode to mirror
__builtin_assume (the semantics have been intentionally kept compatible), and
implements GCC's __builtin_assume_aligned as assume((p - o) & mask == 0). LLVM
now contains special logic to deal with assumptions of this form.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217349 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-07 22:58:14 +00:00
Hal Finkel e85f0ef7d5 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
2014-07-16 22:44:54 +00:00