Chris Lattner
8a4c35dd18
add support for external symbols + X86::MOVPC32r.
...
llvm-svn: 79175
2009-08-16 04:28:14 +00:00
Eli Friedman
d56fca4708
Fix for PR3016: detect the tricky case, where there are
...
unfoldable references to a PHI node in the block being folded, and disable
the transformation in that case. The correct transformation of such PHI
nodes depends on whether BB dominates Succ, and dominance is expensive
to compute here. (Alternatively, it's possible to check whether any
uses are live, but that's also essentially a dominance calculation.
Another alternative is to use reg2mem, but it probably isn't a good idea to
use that in simplifycfg.)
Also, remove some incorrect code from CanPropagatePredecessorsForPHIs
which is made unnecessary with this patch: it didn't consider the case
where a PHI node in BB has multiple uses.
llvm-svn: 79174
2009-08-16 04:23:49 +00:00
Anders Carlsson
e80ccac2cb
Call MaybeBindToTemporary for overloaded binary and unary operators.
...
llvm-svn: 79173
2009-08-16 04:11:06 +00:00
Anders Carlsson
1c83debc36
Call MaybeBindToTemporary when constructing functino call operator calls.
...
llvm-svn: 79172
2009-08-16 03:53:54 +00:00
Anders Carlsson
8c84c206d9
Add MaybeBindToTemporary calls for member call expressions.
...
llvm-svn: 79171
2009-08-16 03:42:12 +00:00
Chris Lattner
c659caa848
implement support for lowering references to global addresses. For example, we now
...
can asmprint:
NEW: movl "L___stack_chk_guard$non_lazy_ptr", %eax
OLD: movl L___stack_chk_guard$non_lazy_ptr, %eax
where 'new' is coming out of the MCInst version of the printer.
llvm-svn: 79170
2009-08-16 03:12:25 +00:00
Anders Carlsson
f898401305
Make sure to call MaybeBindToTemporary when creating CallExprs.
...
llvm-svn: 79168
2009-08-16 03:06:32 +00:00
Chris Lattner
10f605ce2b
more formatting improvements, no functionality change.
...
llvm-svn: 79167
2009-08-16 02:45:18 +00:00
Mike Stump
94bc52c03b
Use the -NEXT feature of FileCheck.
...
llvm-svn: 79166
2009-08-16 02:40:14 +00:00
Chris Lattner
043bb021da
code formatting improvements, no functionality change.
...
llvm-svn: 79165
2009-08-16 02:36:40 +00:00
Chris Lattner
107c21eafc
when emitting errors about CHECK-NEXT directives, show the line that the
...
CHECK-NEXT is on.
llvm-svn: 79164
2009-08-16 02:22:31 +00:00
Erick Tryzelaar
9813beadcd
Add an llvm-c function that lets you insert an instruction with a name.
...
llvm-svn: 79163
2009-08-16 02:20:57 +00:00
Erick Tryzelaar
f57618f62d
Expose most of the Constant creation functions to ocaml.
...
llvm-svn: 79162
2009-08-16 02:20:37 +00:00
Erick Tryzelaar
3235144799
Expose most of the IRBuilder functionality to ocaml.
...
llvm-svn: 79161
2009-08-16 02:20:24 +00:00
Erick Tryzelaar
4cc690cce4
Expose most of the Constant creation functions to llvm-c.
...
llvm-svn: 79160
2009-08-16 02:20:12 +00:00
Erick Tryzelaar
3045b8b5d6
Expose most of the rest of IRBuilder's functions to llvm-c.
...
llvm-svn: 79159
2009-08-16 02:19:59 +00:00
Erick Tryzelaar
a24e5504d0
Add more casts to the IRBuilder.
...
llvm-svn: 79158
2009-08-16 02:19:46 +00:00
Anders Carlsson
bc4c107836
Move builtin call checking out into a separate function, make CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change.
...
llvm-svn: 79157
2009-08-16 01:56:34 +00:00
Mike Stump
22ea1f8a30
Cleanups and fixups for calculating the virtual base offsets. WIP.
...
llvm-svn: 79156
2009-08-16 01:46:26 +00:00
Evan Cheng
badf17cdc7
Needs to check whether unaligned load / store of i64 is legal here.
...
llvm-svn: 79150
2009-08-15 23:41:42 +00:00
Anders Carlsson
f86a8d1030
BuildCXXConstructExpr doesn't need to take an ASTContext.
...
llvm-svn: 79149
2009-08-15 23:41:35 +00:00
Eli Friedman
ea56303b09
Add an explicit constructor to ActiveTemplateInstantiation which
...
initializes all the members; this fixes a valgrind error in the
regression tests.
llvm-svn: 79148
2009-08-15 22:50:33 +00:00
Anders Carlsson
445af45c29
Add a simple test for temporaries.
...
llvm-svn: 79147
2009-08-15 22:30:50 +00:00
Bill Wendling
f7b4c5a295
Remove <iostream>.
...
llvm-svn: 79146
2009-08-15 22:28:08 +00:00
Eli Friedman
c80ca68423
Fix test failure due to uninitialized member.
...
llvm-svn: 79145
2009-08-15 22:23:00 +00:00
Benjamin Kramer
42f3b9d02d
Revert 78996. It was breaking MSVC builds.
...
llvm-svn: 79144
2009-08-15 21:57:01 +00:00
Eli Friedman
c96d4963eb
Implement __is_empty. Patch by Sean Hunt.
...
llvm-svn: 79143
2009-08-15 21:55:26 +00:00
Dan Gohman
b20757bdeb
Mingw also doesn't have st_blksize.
...
llvm-svn: 79142
2009-08-15 21:41:03 +00:00
Eli Friedman
b4d7312249
Fix test on Linux.
...
llvm-svn: 79140
2009-08-15 21:28:17 +00:00
Bill Wendling
b405803fbe
An overhaul of the exception handling code. This is arguably more correct than
...
what was there before. In "no FP mode", we weren't generating labels and unwind
table entries after each "push" instruction. While more than likely "okay", it's
not technically correct. The major thing was that the ordering of when to define
a new CFA register and at what offset wasn't correct. This would cause the
exception handling to fail in ways most miserable to users.
I also cleaned up some code a bit. There's one function which has a "return" at
the beginning, so it's never used. Should I just remove it? :-)
llvm-svn: 79139
2009-08-15 21:27:32 +00:00
Eli Friedman
a10d8ad489
Add svn:ignore to a couple of directories.
...
llvm-svn: 79138
2009-08-15 21:22:20 +00:00
Bill Wendling
bae6b2cca3
Reapply r79127. It was fixed by d0k.
...
llvm-svn: 79136
2009-08-15 21:21:19 +00:00
Bill Wendling
d3fade656f
Revert r79127. It was causing compilation errors.
...
llvm-svn: 79135
2009-08-15 21:14:01 +00:00
Benjamin Kramer
693a9c57a6
Don't try to get the context from an erased Instruction.
...
llvm-svn: 79134
2009-08-15 21:07:49 +00:00
Benjamin Kramer
d2d5e716bd
Unbreak build. Evan, please make sure my changes are correct.
...
llvm-svn: 79133
2009-08-15 20:46:16 +00:00
Nick Lewycky
dd0e74ceee
SSI construction should just go ahead and ignore instructions in unreachable
...
blocks.
llvm-svn: 79132
2009-08-15 20:12:18 +00:00
Bill Wendling
4c1b9b02c5
Fix validation errors.
...
llvm-svn: 79131
2009-08-15 20:08:04 +00:00
Bill Wendling
527241b35e
Fix validation errors.
...
llvm-svn: 79130
2009-08-15 20:07:42 +00:00
Eli Friedman
e99c9c5b60
Ignore -Wno-import.
...
llvm-svn: 79128
2009-08-15 19:28:53 +00:00
Evan Cheng
52d4e64711
Change allowsUnalignedMemoryAccesses to take type argument since some targets
...
support unaligned mem access only for certain types. (Should it be size
instead?)
ARM v7 supports unaligned access for i16 and i32, some v6 variants support it
as well.
llvm-svn: 79127
2009-08-15 19:23:44 +00:00
Eli Friedman
da8d4def72
Don't perform integer promotions on the operand to a cast; this
...
simplifies the AST, and can matter in some rare cases involving
casts to vector types. Patch by Enea Zaffanella.
llvm-svn: 79126
2009-08-15 19:02:19 +00:00
Fariborz Jahanian
0aed0225b4
Improved on ir-gen for synthesis of non-trivial default
...
constructor body whose class has non-static data-members which
required non-trivial construction.
llvm-svn: 79125
2009-08-15 18:55:17 +00:00
Chris Lattner
724af2ca77
wrap to 80 cols
...
llvm-svn: 79124
2009-08-15 18:33:10 +00:00
Chris Lattner
da108b4ed4
implement support for CHECK-NEXT: in filecheck.
...
llvm-svn: 79123
2009-08-15 18:32:21 +00:00
Jakob Stoklund Olesen
ffa73acfec
Refine EarlyClobber assert in register scavenger.
...
It is legal for an inline asm operand to use an earlyclobber register if the
use operand is tied to the earlyclobber operand. The issue is discussed here:
http://gcc.gnu.org/ml/gcc/1999-04n/msg00431.html
We should perhaps let only the machine code verifier worry about these finer
details. EarlyClobber operands are not really interesting to the scavenger.
This fixes PR4528 for the third time.
llvm-svn: 79122
2009-08-15 18:16:58 +00:00
Chris Lattner
10f10ced3f
simplify some code.
...
llvm-svn: 79121
2009-08-15 18:00:42 +00:00
Chris Lattner
6a7b917e32
rewrite FindStringInBuffer to use an explicit loop instead of
...
trying to wrap strstr which is just too inconvenient. Make it
use a StringRef to avoid ".c_str()" calls.
llvm-svn: 79120
2009-08-15 17:53:12 +00:00
Chris Lattner
26cccfe1bc
Instead of using an std::pair, use a custom struct.
...
llvm-svn: 79119
2009-08-15 17:41:04 +00:00
Chris Lattner
c6a803be7c
specify a target triple so global variable manglings are consistent etc.
...
llvm-svn: 79118
2009-08-15 17:35:05 +00:00
Chris Lattner
3838c2dabf
convert to filecheck.
...
llvm-svn: 79117
2009-08-15 17:28:09 +00:00