Chris Lattner
f6d4129c76
specify a triple to use, fixing the test on non-x86-64 hosts.
...
llvm-svn: 91900
2009-12-22 07:01:12 +00:00
Chris Lattner
502f0f11e0
reject invalid input with a caret, e.g.:
...
simple-tests.txt:16:1: error: invalid instruction
0xff 0xff
^
llvm-svn: 91898
2009-12-22 06:58:29 +00:00
Bob Wilson
62a84ea8e3
Generalize SROA to allow the first index of a GEP to be non-zero. Add a
...
missing check that an array reference doesn't go past the end of the array,
and remove some redundant checks for in-bound array and vector references
that are no longer needed.
llvm-svn: 91897
2009-12-22 06:57:14 +00:00
Chris Lattner
dd0c01b5de
various cleanups, make the disassemble reject lines with too much
...
data on them, for example:
addb %al, (%rax)
simple-tests.txt:11:5: error: excess data detected in input
0 0 0 0 0
^
llvm-svn: 91896
2009-12-22 06:56:51 +00:00
Chris Lattner
8879918722
If you thought that it didn't make sense for the disassembler
...
to not produce caret diagnostics, you were right!
llvm-svn: 91895
2009-12-22 06:45:48 +00:00
Chris Lattner
dc9845b79a
rewrite the file parser for the disassembler, implementing support for
...
comments. Also, check in a simple testcase for the disassembler,
including a test for r91864
llvm-svn: 91894
2009-12-22 06:37:58 +00:00
Anders Carlsson
8a35c7982c
Make sure that we mangle overloaded operators that are member functions correctly, giving them the correct arity.
...
With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being).
llvm-svn: 91893
2009-12-22 06:36:32 +00:00
Chris Lattner
72cbaa2ecb
don't crash on blank lines, rename some variables.
...
llvm-svn: 91892
2009-12-22 06:24:00 +00:00
Anders Carlsson
3caa2b486d
Work around PR5514.
...
llvm-svn: 91891
2009-12-22 06:13:42 +00:00
Chris Lattner
f21a220bcd
Implement PR5795 by merging duplicated return blocks. This could go further
...
by merging all returns in a function into a single one, but simplifycfg
currently likes to duplicate the return (an unfortunate choice!)
llvm-svn: 91890
2009-12-22 06:07:30 +00:00
Chris Lattner
2b297ed9ee
convert to filecheck
...
llvm-svn: 91889
2009-12-22 06:04:26 +00:00
Chris Lattner
d806cbc98d
fix a bug handling the gnu ?: extension. Patch by Storlek on IRC,
...
who prefers to be stealthy and mysterious.
llvm-svn: 91888
2009-12-22 06:00:13 +00:00
Anders Carlsson
9c45ad7a1b
When we simply return a retained member expression when instantiating, we must also mark the member decl as referenced.
...
llvm-svn: 91887
2009-12-22 05:24:09 +00:00
Chris Lattner
f3ef2cada7
don't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.
...
llvm-svn: 91886
2009-12-22 04:47:41 +00:00
Chris Lattner
9b7d99eb76
The phi translated pointer can be computed when returning a partially cached result
...
instead of stored. This reduces memdep memory usage, and also eliminates a bunch of
weakvh's. This speeds up gvn on gcc.c-torture/20001226-1.c from 23.9s to 8.45s (2.8x)
on a different machine than earlier.
llvm-svn: 91885
2009-12-22 04:25:02 +00:00
Eli Friedman
e2808379b8
Zap CheckInitializerTypes.
...
llvm-svn: 91884
2009-12-22 02:50:30 +00:00
Eli Friedman
5f101b95c6
Switch default arguments over to InitializationSequence.
...
llvm-svn: 91883
2009-12-22 02:46:13 +00:00
Eli Friedman
a553d4ac95
Switch compound literals over to InitializationSequence.
...
llvm-svn: 91882
2009-12-22 02:35:53 +00:00
Eli Friedman
463e523ad8
Switch file-scope assignment initialization over to InitializationSequence.
...
llvm-svn: 91881
2009-12-22 02:10:53 +00:00
Bill Wendling
919b7aab2e
Add more plumbing. This time in the LowerArguments and "get" functions which
...
return partial registers. This affected the back-end lowering code some.
Also patch up some places I missed before in the "get" functions.
llvm-svn: 91880
2009-12-22 02:10:19 +00:00
Sean Callanan
2f9443f422
Changed REG_* to MODRM_REG_* to avoid conflicts
...
with symbols in AuroraUX's global namespace.
llvm-svn: 91879
2009-12-22 02:07:42 +00:00
Daniel Dunbar
8b532de418
Fix some may-be-uninitialized var warnings.
...
llvm-svn: 91878
2009-12-22 01:41:37 +00:00
Chris Lattner
3d1205b3a8
fix unit test that I broke.
...
llvm-svn: 91877
2009-12-22 01:38:23 +00:00
Bill Wendling
ac08758b71
Add SDNode ordering to inlined asm and VA functions.
...
llvm-svn: 91876
2009-12-22 01:25:10 +00:00
Eric Christopher
ab6a0d60d5
Whitespace fixes.
...
llvm-svn: 91875
2009-12-22 01:23:51 +00:00
Daniel Dunbar
3780f0b680
x86_64: Structures with no fields but which have padding should be classified as
...
integer.
- This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point.
- PR5831.
llvm-svn: 91874
2009-12-22 01:19:25 +00:00
Chris Lattner
18d8b7575e
types don't need atomic inc/dec, they are local to an llvmcontext.
...
llvm-svn: 91873
2009-12-22 01:17:43 +00:00
Bill Wendling
f376c40d0e
Adding more assignment of ordering to SDNodes. This time in the "call" and
...
generic copy functions.
llvm-svn: 91872
2009-12-22 01:11:43 +00:00
Sean Callanan
5c8f4cd396
Fixed library dependencies between the X86 disassembler and
...
X86 codegen that were causing circular symbol dependencies.
llvm-svn: 91871
2009-12-22 01:11:26 +00:00
Douglas Gregor
da8cdbce35
Centralize the emission/suppression/delay of diagnostics describing runtime before in the new function Sema::DiagRuntimeBehavior, addressing one of Chris' comments.
...
llvm-svn: 91870
2009-12-22 01:01:55 +00:00
Chris Lattner
2ee6787c1b
avoid calling extractMallocCall when it's obvious we don't have
...
a call. This speeds up memdep ~1.5%
llvm-svn: 91869
2009-12-22 01:00:32 +00:00
John McCall
463e10cbd5
Stop diagnosing the use of inner classes as friends. ddunbar asked whether
...
this was useful, and on review Doug and I decided it was probably on the level
of a bug in the standard and therefore not worth a warning even in -pedantic.
If someone disagrees and urgently wants clang++ to warn about this in strict
c++98 mode, we can talk about it.
llvm-svn: 91868
2009-12-22 00:59:39 +00:00
Chris Lattner
84463813a1
comment fix: weakvh -> tracking vh
...
llvm-svn: 91867
2009-12-22 00:51:57 +00:00
Bill Wendling
a4d7df7a37
Add ordering of SDNodes to LowerCallTo.
...
llvm-svn: 91866
2009-12-22 00:50:32 +00:00
Fariborz Jahanian
8120346c57
Template code for rewrite of __block variables - wip.
...
llvm-svn: 91865
2009-12-22 00:48:54 +00:00
Chris Lattner
6211d7ba4b
print pcrel immediates as signed values instead of unsigned so that we
...
get things like this out of the disassembler:
0x100000ecb: callq -96
instead of:
0x100000ecb: callq 4294967200
rdar://7491123
llvm-svn: 91864
2009-12-22 00:44:05 +00:00
Bill Wendling
b99b2693f3
Now add ordering to SDNodes created by the massive intrinsic lowering function.
...
llvm-svn: 91863
2009-12-22 00:40:51 +00:00
Douglas Gregor
507eb87f05
Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl
...
llvm-svn: 91862
2009-12-22 00:34:07 +00:00
Douglas Gregor
4141d5bea2
When converting from a type to itself or one of its base classes via a
...
constructor call, the conversion is only a standard conversion
sequence if that constructor is a copy constructor. This fixes PR5834
in a semi-lame way, because the "real" fix will be to move over to
InitializationSequence. That will happen "soonish", but not now.
llvm-svn: 91861
2009-12-22 00:21:20 +00:00
Bill Wendling
ea3e73e596
To make things interesting, I added MORE code to set the ordering of
...
SDNodes. This time in the load/store and limited-precision code.
llvm-svn: 91860
2009-12-22 00:12:37 +00:00
Lang Hames
4c052261de
Changed slot index ranges for MachineBasicBlocks to be exclusive of endpoint.
...
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals.
llvm-svn: 91859
2009-12-22 00:11:50 +00:00
Douglas Gregor
2bb0765bb4
When filling in value initializations within an initializer list, be
...
sure to fill in the initialized member of a union when a member was
explicitly designated. Fixes PR5843.
llvm-svn: 91858
2009-12-22 00:05:34 +00:00
Bill Wendling
c6b473433b
Add more plumbing to assign ordering to SDNodes. Have the "getValue" method
...
assign the ordering when called. Combine some of the ordering assignments to
keep things simple.
llvm-svn: 91857
2009-12-21 23:47:40 +00:00
Fariborz Jahanian
e175eeb117
Providing support for rewriting of block copy/dispose of
...
imported block variables. WIP.
llvm-svn: 91856
2009-12-21 23:31:42 +00:00
Daniel Dunbar
0def3d17cb
ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".
...
- Correctly is in quotes, because we are following what I interpreted as GCC's
intent (which diverges from practice, naturally).
- Also, fix the arch define for arm1136jf-s.
llvm-svn: 91855
2009-12-21 23:28:17 +00:00
Daniel Dunbar
01ba2a765b
Improve updating of test/Makefile for out-of-dir builds.
...
llvm-svn: 91854
2009-12-21 23:28:06 +00:00
Daniel Dunbar
c661a2d4d8
Add suggested parentheses.
...
llvm-svn: 91853
2009-12-21 23:27:57 +00:00
Douglas Gregor
8364e6b568
When a template-id refers to a single function template, and the
...
explicitly-specified template arguments are enough to determine the
instantiation, and either template argument deduction fails or is not
performed in that context, we can resolve the template-id down to a
function template specialization (so sayeth C++0x
[temp.arg.explicit]p3). Fixes PR5811.
llvm-svn: 91852
2009-12-21 23:17:24 +00:00
Chris Lattner
bf20018423
Add a fastpath to Load GVN to special case when we have exactly one dominating
...
load to avoid even messing around with SSAUpdate at all. In this case (which
is very common, we can just use the input value directly).
This speeds up GVN time on gcc.c-torture/20001226-1.c from 36.4s to 16.3s,
which still isn't great, but substantially better and this is a simple speedup
that applies to lots of different cases.
llvm-svn: 91851
2009-12-21 23:15:48 +00:00
Bill Wendling
e79105b591
More ordering plumbing. This time for GEP. I need to remember to assign
...
orderings to values returned by getValue().
llvm-svn: 91850
2009-12-21 23:10:19 +00:00