John McCall
cc7e5bff5c
Rearchitect -Wconversion and -Wsign-compare. Instead of computing them
...
"bottom-up" when implicit casts and comparisons are inserted, compute them
"top-down" when the full expression is finished. Makes it easier to
coordinate warnings and thus implement -Wconversion for signedness
conversions without double-warning with -Wsign-compare. Also makes it possible
to realize that a signedness conversion is okay because the context is
performing the inverse conversion. Also simplifies some logic that was
trying to calculate the ultimate comparison/result type and getting it wrong.
Also fixes a problem with the C++ explicit casts which are often "implemented"
in the AST with a series of implicit cast expressions.
llvm-svn: 103174
2010-05-06 08:58:33 +00:00
John McCall
9aa35bed45
Remember the number of positive and negative bits used by the enumerators of
...
an enum in the enum decl itself. Use some spare bits from TagDecl for this
purpose.
llvm-svn: 103173
2010-05-06 08:49:23 +00:00
Evan Cheng
31cdcd46d6
Re-apply 103156 and 103157. 103156 didn't break anything. 10315 exposed a coalescer bug that's fixed by 103170.
...
llvm-svn: 103172
2010-05-06 06:36:08 +00:00
Chris Lattner
44456d294c
simplify EmitAggMemberInitializer a bit and make it work in 32-bit mode,
...
fixing PR7063.
llvm-svn: 103171
2010-05-06 06:35:23 +00:00
Evan Cheng
c0255bac1d
Fixes a coalescer bug that caused llc to crash on 2009-11-30-LiveVariablesBug.ll
...
with the fix in 103157.
%reg1039:1<def> = VMOVS %S1<kill>, pred:14, pred:%reg0
is not coalescable since none of the super-registers of S1 are in reg1039's
register class: DPR_VFP2. But it is still a legal copy instruction so it should
not assert.
llvm-svn: 103170
2010-05-06 06:23:31 +00:00
Chris Lattner
3628326b44
add todos for isinf_sign and isnormal, which I don't intend to implement
...
in the near future.
llvm-svn: 103169
2010-05-06 06:13:53 +00:00
Chris Lattner
dbff4bf5f4
implement codegen support for __builtin_isfinite, part of PR6083
...
llvm-svn: 103168
2010-05-06 06:04:13 +00:00
Chris Lattner
68784efaf6
optimize builtin_isnan/isinf to not do an extraneous extension from
...
float -> double (which happens because they are modelled as int(...)
functions), and add a testcase for isinf.
llvm-svn: 103167
2010-05-06 05:50:07 +00:00
Chris Lattner
43660c5bc0
implement part of PR6083: codegen support for isinf. Like isnan,
...
this is generating correct but suboptimal (extra extend to double)
code for the float case. Will investigate next.
llvm-svn: 103166
2010-05-06 05:35:16 +00:00
Chandler Carruth
2998b5458d
Mark a variable as used in the absence of asserts to silence a GCC warning.
...
llvm-svn: 103165
2010-05-06 05:28:42 +00:00
Alexis Hunt
41e9f77628
Fix some stylistic issues with my last commit.
...
llvm-svn: 103164
2010-05-06 05:24:38 +00:00
Dan Gohman
77c71811f5
Revert r103157, which broke test/CodeGen/ARM/2009-11-30-LiveVariablesBug.ll.
...
llvm-svn: 103163
2010-05-06 05:08:57 +00:00
Chandler Carruth
a77a72734c
Remove a dependency on Frontend headers in the Driver library. Also saves
...
building and passing arguments to cc1 layer when setting values to their
defaults.
llvm-svn: 103162
2010-05-06 04:55:18 +00:00
Zhongxing Xu
1a56a488ed
Turn -analyzer-inline-call on for C functions. This also fixed a bug that
...
after inlining post-call checking shouldn't be done.
llvm-svn: 103161
2010-05-06 03:38:27 +00:00
Zhongxing Xu
9174b2c2f9
Make -analyzer-inline-call not a separate analysis. Instead it's a boolean
...
flag now, and can be used with other analyses. Only turned it on for C++
methods for now.
llvm-svn: 103160
2010-05-06 02:59:29 +00:00
Eric Christopher
9feb1bb117
Revert r103156 since it was breaking the build bots.
...
Reverse-merging r103156 into '.':
U lib/Target/ARM/ARMInstrNEON.td
U lib/Target/ARM/ARMRegisterInfo.h
U lib/Target/ARM/ARMBaseRegisterInfo.cpp
U lib/Target/ARM/ARMBaseInstrInfo.cpp
U lib/Target/ARM/ARMRegisterInfo.td
llvm-svn: 103159
2010-05-06 02:29:06 +00:00
Dan Gohman
d351116be0
Handle the case where open(2) or close(2) is interrupted by a signal when
...
automatic syscall restarting is disabled.
Also, fix the build on systems which don't define EWOULDBLOCK.
llvm-svn: 103158
2010-05-06 02:06:20 +00:00
Evan Cheng
8fd7b510d6
Fix an obvious bug in isMoveInstr. It needs to return sub-register indices.
...
llvm-svn: 103157
2010-05-06 01:54:03 +00:00
Evan Cheng
8f99a1c6b4
Adding pseudo 256-bit registers QQ0 . . . QQ7 to represent pairs of Q registers. These will be used to model VLD2 / VST2 instructions in order to get substantially better codegen for them.
...
llvm-svn: 103156
2010-05-06 01:52:03 +00:00
Evan Cheng
9d768f4445
Cosmetic changes.
...
llvm-svn: 103155
2010-05-06 01:34:11 +00:00
Evan Cheng
718ff448df
storeRegToStackSlot has forgotten about QPR_8 register class.
...
llvm-svn: 103154
2010-05-06 01:32:54 +00:00
Dan Gohman
ef969f3539
Handle EWOULDBLOCK as EAGAIN. And add a comment explaining why
...
EAGAIN and EWOULDBLOCK are used here.
Also, handle the case where a write call is interrupted after
some data has already been written.
llvm-svn: 103153
2010-05-06 01:27:36 +00:00
Chris Lattner
b903a15807
make -filetype=obj default to emitting its output to foo.obj
...
when on windows instead of foo.o. Patch by Nathan Jeffords!
llvm-svn: 103150
2010-05-06 00:54:20 +00:00
Dan Gohman
47d04e3e41
Update LabelsBeforeInsn also, when creating unknown-position labels.
...
llvm-svn: 103145
2010-05-06 00:29:41 +00:00
Douglas Gregor
e902956f59
Partial and full specializations of a class template may have a
...
different tag kind ("struct" vs. "class") than the primary template,
which has an affect on access control.
Should fix the last remaining Boost.Accumulors failure.
llvm-svn: 103144
2010-05-06 00:28:52 +00:00
Ted Kremenek
5b0773e201
Workaround a really serious caching bug in SourceManager::isBeforeInTranslationUnit() where the
...
method will sometimes return different results for the same input SourceLocations. I haven't
unraveled this method completely yet, so this truly is a workaround until a better fix comes
along.
llvm-svn: 103143
2010-05-06 00:22:25 +00:00
Chandler Carruth
f3983652eb
Clean up the {} and else placement. This fixes an ambiguous else as well as
...
picking a more consistent pattern.
llvm-svn: 103142
2010-05-06 00:20:39 +00:00
Chandler Carruth
27c9fe9f8b
Silence a pedantic GCC warning by making the grouping of && and || explicit.
...
llvm-svn: 103141
2010-05-06 00:15:06 +00:00
Chris Lattner
35096e82c5
Fix PR7054 - Assertion `Symbol->isUndefined() && "Cannot define a symbol twice!"' failed.
...
Users can write broken code that emits the same label twice with asm renaming,
detect this and emit a fatal backend error instead of aborting.
llvm-svn: 103140
2010-05-06 00:05:37 +00:00
Dan Gohman
a7c717d8d4
In bottom-up mode, defer the materialization of local constant values.
...
llvm-svn: 103139
2010-05-06 00:02:14 +00:00
Dan Gohman
ffcb590b0f
Add an "IsBottomUp" member function to FastISel, which will be used to
...
support a new bottom-up mode.
llvm-svn: 103138
2010-05-05 23:58:35 +00:00
Chris Lattner
482fa218d4
fix rdar://7946934 - in some limited cases, the assembler should
...
allow $ at the start of a symbol name.
llvm-svn: 103137
2010-05-05 23:51:28 +00:00
Jim Grosbach
151cd8f159
Cleanup of ARMv7M support. Move hardware divide and Thumb2 extract/pack
...
instructions to subtarget features and update tests to reflect.
PR5717.
llvm-svn: 103136
2010-05-05 23:44:43 +00:00
Dan Gohman
50849c63e4
Emit debug info for MachineInstrs with unknown debug locations, instead
...
of just letting them inherit the debug locations of adjacent instructions.
Debug info should aim to be either accurate or absent.
llvm-svn: 103135
2010-05-05 23:41:32 +00:00
Chris Lattner
966a382ae7
Fix some ..'s
...
llvm-svn: 103134
2010-05-05 23:29:09 +00:00
Jakob Stoklund Olesen
1b6f698e85
Fix PR6520. An earlyclobber physreg must not be allocated to anything else.
...
llvm-svn: 103133
2010-05-05 23:07:41 +00:00
John McCall
eebc832f43
Add IgnoreParenImpCasts() to Expr, which is basically like IgnoreParenCasts
...
except it only skips implicit casts.
Also fix ObjCImplicitGetterSetterRefExpr's child_begin to skip the base expression
if it's actually a type reference (which you get with static property references).
llvm-svn: 103132
2010-05-05 22:59:52 +00:00
Chris Lattner
3baada6fd7
Pass the globaldecl into GetOrCreateLLVMFunction so that llvm
...
function attributes like byval get applied to the function
definition. This fixes PR7058 and makes i386 llvm/clang bootstrap
pass all the same tests as x86-64 bootstrap for me (the llvmc
tests still fail in both).
llvm-svn: 103131
2010-05-05 22:55:13 +00:00
Stuart Hastings
7e60a6bd71
Test case for pr2394 and r102979.
...
llvm-svn: 103129
2010-05-05 22:49:33 +00:00
Sean Callanan
4cd930f417
Fixed a sign-extension bug in the X86 disassembler
...
that was causing PC-relative branch targets to be
evaluated incorrectly. Also added support for
checking operand values to the llvm-mc tester.
llvm-svn: 103128
2010-05-05 22:47:27 +00:00
Douglas Gregor
bf1fb44efa
When implicit definition of the copy-assignment operator fails,
...
provide a note that shows where the copy-assignment operator was
needed. We used to have this, but I broke it during refactoring.
Finishes PR6999.
llvm-svn: 103127
2010-05-05 22:38:15 +00:00
Devang Patel
92b21cad5d
Use getValue() for PHINodes when direct NodeMap access does not work.
...
llvm-svn: 103126
2010-05-05 22:29:00 +00:00
Bob Wilson
0d545607f7
Select an ARM-hosted cross build with a separate makefile target instead of
...
a magic project name.
llvm-svn: 103125
2010-05-05 22:22:40 +00:00
Evan Cheng
61908f6b6c
Do not pre-allocate references of D registers pairs if they are extracted from the same Q register and are in the right order.
...
llvm-svn: 103124
2010-05-05 22:15:40 +00:00
Fariborz Jahanian
25491a22af
This patch deals with Sema Part of Setter/Getter synthesis
...
of properties which are of C++ objects. Code Gen to follow
(Radar 7468090).
llvm-svn: 103123
2010-05-05 21:52:17 +00:00
Jim Grosbach
245b169212
fix copy/paste oops.
...
llvm-svn: 103122
2010-05-05 21:07:46 +00:00
Dan Gohman
f62cd20b62
No-ops emitted for scheduling don't correspond with anything in the
...
user's source, so don't arbitrarily assign them a debug location.
llvm-svn: 103121
2010-05-05 20:58:01 +00:00
Jim Grosbach
44d7f49887
Add tests for ARMV7M divide instruction use
...
llvm-svn: 103120
2010-05-05 20:47:15 +00:00
Jim Grosbach
92d999001c
Add initial support for ARMv7M subtarget and cortex-m3 cpu. Patch by
...
Jordy <snhjordy@gmail.com>.
Followup patches will add some tests and adjust to use Subtarget features
for the instructions.
llvm-svn: 103119
2010-05-05 20:44:35 +00:00
Bob Wilson
0c8b29bcdb
Use the right version of "append" to combine two SmallVectors.
...
This fixes the compile-time regressions seen in last night's tests.
llvm-svn: 103118
2010-05-05 20:44:15 +00:00