Ted Kremenek
828f631af1
Fix a CFGBuilder bug exposed on convoluted control-flow in the Linux kernel.
...
llvm-svn: 126149
2011-02-21 22:11:26 +00:00
Chris Lattner
93ede02045
add one more case of mismatched input/output constraints.
...
When the mismatch is due to a larger input operand that is
a constant, truncate it down to the size of the output. This
allows us to accept some cases in the linux kernel and elsewhere.
Pedantically speaking, we generate different code than GCC, though
I can't imagine how it would matter:
Clang:
movb $-1, %al
frob %al
GCC:
movl $255, %eax
frob %al
llvm-svn: 126148
2011-02-21 22:09:29 +00:00
Sean Callanan
5e8603d1b9
Fixed a bug in the X86 disassembler where a member of the
...
X86 instruction decode structure was being interpreted as
being in units of bits, although it is actually stored in
units of bytes.
llvm-svn: 126147
2011-02-21 21:55:05 +00:00
Chris Lattner
e3694b166a
more code restructuring, no functionality change.
...
llvm-svn: 126146
2011-02-21 21:50:25 +00:00
Chris Lattner
70a4e9b5e2
split the iteration loop out to a helper function, no functionality change.
...
llvm-svn: 126145
2011-02-21 21:40:33 +00:00
Johnny Chen
28c5882cb5
Add emulation methods for "TST (immediate)" and "TST (register)".
...
Plus modified EmulateANDImm/Reg to delegate to TSTImm/Reg for Thumb2
32-bit instructions when Rd == '1111' and setflags is true.
llvm-svn: 126144
2011-02-21 21:24:49 +00:00
Chris Lattner
169766f306
fix a comment.
...
llvm-svn: 126143
2011-02-21 21:15:10 +00:00
Stuart Hastings
b6a4d3ebd2
Test case for r126127 and r126141. Radar 9012638.
...
llvm-svn: 126142
2011-02-21 21:08:21 +00:00
Stuart Hastings
d7927e0fcd
End the line if we return early. Radar 9012638.
...
llvm-svn: 126141
2011-02-21 21:07:07 +00:00
Richard Smith
5503805555
Mangling of undeduced 'auto' types, as specified by Itanium C++ ABI.
...
llvm-svn: 126140
2011-02-21 20:10:02 +00:00
Richard Smith
b2bc2e6752
Tweaks to C++0x deduced auto type support:
...
* Flag indicating 'we're parsing this auto typed variable's initializer' moved from VarDecl to Sema
* Temporary template parameter list for auto deduction is now allocated on the stack.
* Deduced 'auto' types are now uniqued.
llvm-svn: 126139
2011-02-21 20:05:19 +00:00
Ted Kremenek
bda17491c4
Fix call to send_error() in scan-view. An int error code is expected but a string was being sent. Patch by Andrew Price!
...
llvm-svn: 126138
2011-02-21 19:26:48 +00:00
John McCall
15dd404c46
Don't warn about static const integral data members with in-line constant
...
initializers just because they don't have a proper out-of-line definition.
Such code is technically ill-formed but is too common and too unlikely to be
a problem to be seriously worth worrying about.
llvm-svn: 126137
2011-02-21 19:25:48 +00:00
David Greene
55820a6b7b
Add a convenience tool for doing comparison builds of the LLVM
...
ecosystem. This is a handy utility for checking changes before
committing them to the repository.
llvm-svn: 126136
2011-02-21 19:23:22 +00:00
Chris Lattner
22b7495ec8
Better OpenBSD support, patch by Amit Kulkarni. I have no way to test
...
that this doesn't break gold, but it seems reasonable to me.
llvm-svn: 126135
2011-02-21 18:38:56 +00:00
Fariborz Jahanian
786e04cda5
Turn on 'auto' in plain objc mode.
...
llvm-svn: 126134
2011-02-21 18:37:13 +00:00
Chris Lattner
d0257f79bc
Pass the right linker flag in openbsd::Link::ConstructJob,
...
patch by Matthew Dempsky!
llvm-svn: 126133
2011-02-21 18:36:51 +00:00
Richard Osborne
1ae65c7cb8
Add XCore intrinsics for various instructions on ports.
...
llvm-svn: 126132
2011-02-21 18:23:30 +00:00
Stuart Hastings
33a3f356ef
Test case for r126127. Radar 9012638.
...
llvm-svn: 126131
2011-02-21 18:08:40 +00:00
Duncan Sands
bda7175a43
The stack should be 16 byte aligned on 32 bit solaris. Patch by Yuri.
...
llvm-svn: 126130
2011-02-21 17:37:17 +00:00
Duncan Sands
ecbbf0825b
If the phi node was used by an unreachable instruction that ends up using
...
itself without going via a phi node then we could return false here in
spite of making a change. Also, tweak the comment because this method
can (and always could) return true without deleting the original phi node.
For example, if the phi node was used by a read-only invoke instruction
which is used by another phi node phi2 which is only used by and only uses
the invoke, then phi2 would be deleted but not the invoke instruction and
not the original phi node.
llvm-svn: 126129
2011-02-21 17:32:05 +00:00
Fariborz Jahanian
f5bfc46c95
Remove warning on future change in ivar lookup rule
...
when doing the property default synthesis.
// rdar://9027673.
llvm-svn: 126128
2011-02-21 17:31:28 +00:00
Stuart Hastings
b4863a41e9
Fix to correctly support attribute((section("__DATA, __common"))).
...
Radar 9012638.
llvm-svn: 126127
2011-02-21 17:27:17 +00:00
Chris Lattner
5237febf0c
a serious "compare CSE" issue that is nontrivial to get right,
...
but which is responsible for us doing really bad things to 256.bzip2.
llvm-svn: 126126
2011-02-21 17:03:47 +00:00
Chris Lattner
2333ac279f
fix a crasher in disabled code (on variable stride loops)
...
llvm-svn: 126125
2011-02-21 17:02:55 +00:00
Duncan Sands
6dcd49bc2b
Simplify RecursivelyDeleteDeadPHINode. The only functionality change
...
should be that if the phi is used by a side-effect free instruction with
no uses then the phi and the instruction now get zapped (checked by the
unittest).
llvm-svn: 126124
2011-02-21 16:27:36 +00:00
John McCall
5decec97e5
Reorganize subelement initialization checking, no functionality change.
...
llvm-svn: 126116
2011-02-21 07:57:55 +00:00
John McCall
66884dd93c
Small optimization: avoid redundant checks of whether a type is an array
...
when checking an initialization.
llvm-svn: 126115
2011-02-21 07:22:22 +00:00
John McCall
701417a0ac
Pseudo-revirtualize CallExpr::getSourceRange by making it follow the
...
logic from CXXMemberCallExpr and by making it check for
CXXOperatorCallExpr in order to defer. This is not really an awesome solution,
but I don't have a better idea.
llvm-svn: 126114
2011-02-21 06:23:05 +00:00
John McCall
e9dab636df
Bind references to opaque r-values correctly. Add a few test cases
...
for ?: on record types.
llvm-svn: 126113
2011-02-21 05:25:38 +00:00
NAKAMURA Takumi
860abd0f28
Target/X86/X86FastISel: [PR6275] Fix Win32's dllimport function with fastisel.
...
"dllimport" function must not be GlobalVariable, but Function. It is enough to check with GlobalValue.
test/CodeGen/X86/dll-linkage.ll is updated to check llc -O0.
llvm-svn: 126110
2011-02-21 04:50:06 +00:00
Venkatraman Govindaraju
a82203f875
Generate correct Sparc32 ABI compliant code for functions that return a struct.
...
llvm-svn: 126108
2011-02-21 03:42:44 +00:00
NAKAMURA Takumi
66242b85f0
CMake: Define LLVM_INCLUDE_TESTS in cmake/modules/HandleLLVMOptions.cmake. It affects testing stuff on clang-standalone build.
...
llvm-svn: 126107
2011-02-21 03:21:06 +00:00
NAKAMURA Takumi
27b0b5a997
CMake: Fix breakage on clang standalone build.
...
llvm-svn: 126106
2011-02-21 03:20:57 +00:00
NAKAMURA Takumi
19c9fb6cbc
CMake: Eliminate duplicate -D__STDC_LIMIT_MACROS and -D__STDC_CONSTANT_MACROS. llvm/cmake/modules/HandleLLVMOptions.cmake defines them.
...
llvm-svn: 126105
2011-02-21 03:19:49 +00:00
John McCall
f2e9110a9f
Rename test/CodeGenCXX/gnu-conditional-scalar-ext.cpp to conditional-gnu-ext.cpp
...
for consistency with other tests (and to remove "scalar" from the name).
llvm-svn: 126104
2011-02-21 02:28:50 +00:00
Chris Lattner
e9cba7bd34
add a missed loop deletion case.
...
llvm-svn: 126103
2011-02-21 02:13:39 +00:00
Chris Lattner
bc661d6686
Add some (disabled code) to print out negative strides.
...
llvm-svn: 126102
2011-02-21 02:08:54 +00:00
Chris Lattner
659c793a4e
add an idiom that loop idiom could theoretically catch.
...
llvm-svn: 126101
2011-02-21 01:33:38 +00:00
Cameron Zwarich
39314bdbc8
A lo/hi mul has higher latency than an imul r,ri, e.g. 5 cycles compared to 3
...
on Core 2 and Nehalem, so the code we generate is better than GCC's here.
llvm-svn: 126100
2011-02-21 01:29:32 +00:00
Joerg Sonnenberger
eef2f9009d
Use a vector of pairs to implement the section stack, not two
...
independent vectors.
llvm-svn: 126099
2011-02-21 01:07:42 +00:00
Chandler Carruth
d05b352b0e
Clean up the tests for warning about unused function results given the
...
appropriate attribute. Add a bit more testing that finds a pretty bad
regression (since ~forever) in this warning. Fix it with a nice 2 line
change. =]
llvm-svn: 126098
2011-02-21 00:56:56 +00:00
Cameron Zwarich
8731d0cc83
The signed version of our "magic number" computation for the integer approximation
...
of a constant had a minor typo introduced when copying it from the book, which
caused it to favor negative approximations over positive approximations in many
cases. Positive approximations require fewer operations beyond the multiplication.
In the case of division by 3, we still generate code that is a single instruction
larger than GCC's code.
llvm-svn: 126097
2011-02-21 00:22:02 +00:00
Chandler Carruth
468b5cbd40
Allow -Wformat to be enabled without -Wformat-security. GCC gates
...
-Wformat-security on -Wformat, not vice-versa.
Fixes PR8486. Patch by Oleg Slezberg.
llvm-svn: 126096
2011-02-21 00:07:51 +00:00
Oscar Fuentes
15fe190027
Put targets on folders, if the IDE supports the feature.
...
Requires CMake 2.8.3 or newer.
llvm-svn: 126094
2011-02-20 22:06:44 +00:00
Oscar Fuentes
6f72540e46
New function for tablegenning: clang_tablegen.
...
llvm-svn: 126093
2011-02-20 22:06:32 +00:00
Oscar Fuentes
3145e923c1
Put targets on folders, if the IDE supports the feature.
...
Requires CMake 2.8.3 or newer.
llvm-svn: 126092
2011-02-20 22:06:10 +00:00
Rafael Espindola
f849bf81bd
Add some limited support for labels in org directives. Hopefully enough to fix
...
PR9245.
llvm-svn: 126091
2011-02-20 20:20:07 +00:00
Oscar Fuentes
e9c7994669
Correct name of dependent target.
...
CMake complained about this while generating VS project files but was
okay with it while generating makefiles on Linux.
llvm-svn: 126090
2011-02-20 19:41:34 +00:00
Rafael Espindola
9ef90d5b35
Dispose modules early and only create codegen when the plugin is being
...
used by the linker and not by nm or ar.
llvm-svn: 126089
2011-02-20 18:28:29 +00:00