Dan Gohman
d07d2f9774
Add a comment to this test.
...
llvm-svn: 102387
2010-04-26 21:37:43 +00:00
Jeffrey Yasskin
5d284ae8a0
Consolidate the description of volatile operations, now that some of the
...
intrinsics have volatile semantics in addition to the load and store
instructions.
llvm-svn: 102384
2010-04-26 21:21:24 +00:00
Dan Gohman
48a2588be4
Branching or switching on trap transfers imminent undefined behavior
...
onto control-dependent instructions.
llvm-svn: 102381
2010-04-26 20:54:53 +00:00
Dale Johannesen
59a438560c
Remove crufty comments.
...
llvm-svn: 102380
2010-04-26 20:48:54 +00:00
Gabor Greif
137d90c763
add some typewriter tags
...
llvm-svn: 102378
2010-04-26 20:46:03 +00:00
Dan Gohman
b2a709be07
Fix HTML errors that Jeffery Yasskin noticed.
...
llvm-svn: 102376
2010-04-26 20:21:21 +00:00
Dale Johannesen
91358585d7
Handle target-specific form of DBG_VALUE in AsmPrinter.
...
llvm-svn: 102373
2010-04-26 20:07:31 +00:00
Dale Johannesen
e098352ed1
Add DBG_VALUE handling for byval parameters; this
...
produces a comment on targets that support it, but
the Dwarf writer is not hooked up yet.
llvm-svn: 102372
2010-04-26 20:06:49 +00:00
Dale Johannesen
bc41cfa78f
Add PPC AsmPrinter handling for target-specific form of
...
DBG_VALUE, and a cautionary comment.
llvm-svn: 102371
2010-04-26 20:05:01 +00:00
Evan Cheng
0e6fc61f21
Insert dbg_value instructions for function entry block liveins (i.e. function arguments).
...
llvm-svn: 102368
2010-04-26 19:16:00 +00:00
Evan Cheng
6e45f1d1ff
Promoting 16-bit cmp / test aren't free. Don't do it.
...
llvm-svn: 102366
2010-04-26 19:06:11 +00:00
Chris Lattner
f740a8ceeb
fix PR6921 a different way. Intead of increasing the
...
alignment of globals with a specified alignment, we fix
common variables to obey their alignment. Add a comment
explaining why this behavior is important.
llvm-svn: 102365
2010-04-26 18:46:46 +00:00
Evan Cheng
c72d8a7dad
Re-enable 102323 with fix: do not update dbg_value's with incorrect frame indices when the live interval are being re-materialized.
...
llvm-svn: 102361
2010-04-26 18:37:21 +00:00
Chris Lattner
e80442aa6d
Revert r102300/102301, which serious broke objc apps.
...
llvm-svn: 102359
2010-04-26 18:30:45 +00:00
Chris Lattner
87aa2243e2
fix PR6940: sitofp(undef) folds to 0.0, not undef.
...
llvm-svn: 102358
2010-04-26 18:21:23 +00:00
Chris Lattner
5de7f6e02b
wrap some long lines.
...
llvm-svn: 102354
2010-04-26 17:42:18 +00:00
Bob Wilson
d561daf520
Update MachineSSAUpdater with the same changes I made for the IR-level
...
SSAUpdater. I'm going to try to refactor this to share most of the code
between them.
llvm-svn: 102353
2010-04-26 17:40:49 +00:00
Chris Lattner
df85c89c45
add GHC, thanks to David Terei
...
llvm-svn: 102352
2010-04-26 17:38:10 +00:00
Evan Cheng
5ad3cc1d5e
Temporary disable spiller modifying dbg_value. It's breaking build.
...
llvm-svn: 102327
2010-04-26 08:24:07 +00:00
Evan Cheng
1ff9d1b63e
Remove a redundant comment.
...
llvm-svn: 102326
2010-04-26 08:16:57 +00:00
Evan Cheng
f19bd4ebba
Add PPC specific emitFrameIndexDebugValue.
...
llvm-svn: 102325
2010-04-26 07:39:36 +00:00
Evan Cheng
bcb99ecc18
Add ARM specific emitFrameIndexDebugValue.
...
llvm-svn: 102324
2010-04-26 07:39:25 +00:00
Evan Cheng
ed69b382ea
- Move TargetLowering::EmitTargetCodeForFrameDebugValue to TargetInstrInfo and rename it to emitFrameIndexDebugValue.
...
- Teach spiller to modify DBG_VALUE instructions to reference spill slots.
llvm-svn: 102323
2010-04-26 07:38:55 +00:00
Dale Johannesen
582565e991
Stop abusing EmitInstrWithCustomInserter for target-dependent
...
form of DEBUG_VALUE, as it doesn't have reasonable default
behavior for unsupported targets. Add a new hook instead.
No functional change.
llvm-svn: 102320
2010-04-25 21:33:54 +00:00
Gabor Greif
60084b176e
another typo pointed out by sajd
...
llvm-svn: 102319
2010-04-25 21:30:22 +00:00
Gabor Greif
c1670318e2
fix two typos pointed out by sajd
...
llvm-svn: 102318
2010-04-25 21:27:54 +00:00
Dale Johannesen
1fc01985a3
Add comment re byval args. Doesn't actually work this way yet.
...
xs
llvm-svn: 102316
2010-04-25 21:03:54 +00:00
David Chisnall
17dff47e22
Added bullet about GNUstep Objective-C ABI support to the Clang section of the release notes.
...
llvm-svn: 102309
2010-04-25 19:13:33 +00:00
Chris Lattner
4d7b4b4d15
testcase for PR6913
...
llvm-svn: 102303
2010-04-25 05:51:14 +00:00
Chris Lattner
6ac247a092
this passes now.
...
llvm-svn: 102301
2010-04-25 05:49:31 +00:00
Chris Lattner
386a220f70
Fix PR6921: globals were not getting correctly rounded up to their
...
preferred alignment unless they were common or some other special
case.
llvm-svn: 102300
2010-04-25 05:30:43 +00:00
Chris Lattner
9deb87a996
silence a warning, patch by "mike".
...
llvm-svn: 102297
2010-04-25 04:44:26 +00:00
Chris Lattner
b34ffe36ae
remove #if 1's.
...
llvm-svn: 102296
2010-04-25 04:43:02 +00:00
Dan Gohman
a1c94049c2
Fix an autoconf bug: The second argument to AC_LANG_PROGRAM is code that
...
gets placed inside a main function, and should not itself be a main
function. This is silently hidden in GCC-hosted builds because the
inner main looks like a nested function declaration, which GCC supports.
In builds with compilers which do not support nested functions (by default),
this was causing an error, which caused these autoconf checks to fail,
leaving their options disabled.
This fixes test/Feature/load_module.ll on x86_64-unknown-linux-gnu
llvm-gcc selfhost builds, among other things.
This also includes a regenerated configure, as the diff is small and telling.
llvm-svn: 102288
2010-04-25 00:12:20 +00:00
Dan Gohman
283a350f4d
PHI nodes also do not necessarily return trap with a trap operand.
...
llvm-svn: 102278
2010-04-24 22:15:58 +00:00
Nick Lewycky
9a7459af1d
Fix typo.
...
llvm-svn: 102276
2010-04-24 22:01:40 +00:00
Nick Lewycky
20f5e974e4
Use provided llvm-defined variables instead of twisting user-controlled knobs.
...
No visible change.
llvm-svn: 102240
2010-04-24 05:07:24 +00:00
Nick Lewycky
3afcd7cd80
Don't touch CXXFLAGS. If it's set in the environment then sub-makes will see
...
the variable that we set as though it came from the user. Fixes PR6835.
llvm-svn: 102239
2010-04-24 04:56:34 +00:00
Evan Cheng
a02d0e7d6b
Avoid promoting a i16 node if it would eliminate a (store (op (load))) opportunity.
...
llvm-svn: 102237
2010-04-24 04:44:57 +00:00
Evan Cheng
0abb54d631
When a load operand is promoted to an extload, replace other uses with uses of extload result truncated.
...
llvm-svn: 102236
2010-04-24 04:43:44 +00:00
Dan Gohman
534ba376f6
Generalize LSR's OptimizeMax to handle the new kinds of max expressions
...
that indvars may use, now that indvars is recognizing le and ge loops.
llvm-svn: 102235
2010-04-24 03:13:44 +00:00
Dan Gohman
f33bac3afe
ScalarEvolution support for <= and >= loops.
...
Also, generalize ScalarEvolutions's min and max recognition to handle
some new forms of min and max that this change makes more common.
llvm-svn: 102234
2010-04-24 03:09:42 +00:00
Dan Gohman
36cce7e0dd
Use SimplifyICmpOperands in isKnownPredicate too.
...
llvm-svn: 102233
2010-04-24 01:38:36 +00:00
Dan Gohman
3673aa1a51
Update isImpliedCond to use the new SimplifyICmpOperands utility.
...
llvm-svn: 102232
2010-04-24 01:34:53 +00:00
Dan Gohman
48ff3cf63b
Add a new utility function SimplifyICmpOperands. Much of this code is
...
refactored out of ScalarEvolution::isImpliedCond, which will be updated
to use this new utility routine soon.
llvm-svn: 102229
2010-04-24 01:28:42 +00:00
Dan Gohman
5544b0c588
Apply a fix for a vector setcc dagcombine from Jan Sjodin. No
...
testcase yet, as the testcase now fails downstream.
llvm-svn: 102228
2010-04-24 01:17:30 +00:00
Sean Callanan
75d986935e
Fixed edis to tokenize instructions with no
...
operands correctly.
llvm-svn: 102227
2010-04-24 01:00:16 +00:00
Jim Grosbach
e842140ccf
cross-build Makefile needs to unset CFLAGS/CXXFLAGS when building the build-side utilities since the flags will be for the cross-compiler.
...
llvm-svn: 102225
2010-04-24 00:46:14 +00:00
Chris Lattner
11d1df442d
no longer xfail
...
llvm-svn: 102220
2010-04-23 22:39:33 +00:00
Sean Callanan
85d70594f0
Fixes to edis that mark x86 call targets as
...
memory operands rather than immediate operands.
llvm-svn: 102217
2010-04-23 22:17:17 +00:00
Stuart Hastings
c8b2fc0909
Per Chris, fuse four trivial tests using grep (r102199) into one that uses FileCheck.
...
llvm-svn: 102216
2010-04-23 22:12:57 +00:00
Chris Lattner
d3b361d1b6
enable my inliner change: add newly devirtualized call sites to
...
the worklist, making them inline candidates.
llvm-svn: 102213
2010-04-23 21:16:07 +00:00
Dan Gohman
e1931fa676
Change TargetData's algorithm for computing defualt vector type
...
alignment to match what's used in clang and GCC for __alignof, rather
than trying to guess what Legalize is going to be doing.
llvm-svn: 102206
2010-04-23 19:41:15 +00:00
Evan Cheng
b9ff130d47
Code refactoring.
...
llvm-svn: 102202
2010-04-23 19:10:30 +00:00
Stuart Hastings
24b63f1597
Add some missing x86 patterns for movdq2q. Fixes two (LLVM-)GCC DejaGNU testcases. Radar 6881029.
...
llvm-svn: 102199
2010-04-23 19:03:32 +00:00
Chris Lattner
126a58e084
fix some failures my callgraph dump format change broke.
...
llvm-svn: 102197
2010-04-23 18:38:40 +00:00
Chris Lattner
c691de3b4e
switch InlineInfo.DevirtualizedCalls's list to be of WeakVH.
...
This fixes a bug where calls inlined into an invoke would get
changed into an invoke but the array would keep pointing to
the (now dead) call. The improved inliner behavior is still
disabled for now.
llvm-svn: 102196
2010-04-23 18:37:01 +00:00
Chris Lattner
6f41ef9d31
testcase for the bug that required a patch to be reverted.
...
llvm-svn: 102195
2010-04-23 18:31:01 +00:00
Chris Lattner
8c56254096
fix callgraph dump to not print 0x0x1234 for nodes.
...
Add the instruction pointer value for debuggability.
We now get dump output that looks like this:
Call graph node for function: 'f1'<<0x1017086b0>> #uses=1
CS<0x1017046f8> calls external node
Call graph node for function: '_ZNSt6vectorIdSaIdEEC1EmRKdRKS0_'<<0x1017086f0>> #uses=1
CS<0x0> calls external node
Call graph node for function: 'f4'<<0x1017087a0>> #uses=1
CS<0x101708c88> calls function 'f3'
llvm-svn: 102194
2010-04-23 18:23:40 +00:00
Evan Cheng
0367559786
Fix X86ISD::CMP i16 to i32 promotion.
...
llvm-svn: 102192
2010-04-23 18:21:16 +00:00
Dan Gohman
6e9a8fcc28
Move FastISel's HandlePHINodesInSuccessorBlocks call down into FastISel
...
itself too.
llvm-svn: 102176
2010-04-23 15:29:50 +00:00
Dan Gohman
5725580bb6
Switch getelementptr inbounds and sdiv exact from undef to trap.
...
llvm-svn: 102175
2010-04-23 15:23:32 +00:00
Sean Callanan
62232d90cf
Fixed EDOperand to use the operand type, not the
...
flags, to determine whether or not the operand is
a memory operand.
llvm-svn: 102158
2010-04-23 01:56:36 +00:00
Dan Gohman
997bbc54d6
Fix LSR to tolerate cases where ScalarEvolution initially
...
misses an opportunity to fold add operands, but folds them
after LSR has separated them out. This fixes rdar://7886751.
llvm-svn: 102157
2010-04-23 01:55:05 +00:00
Dan Gohman
ff3174e97f
When it doesn't matter whether zero or sign extension is used,
...
use ScalarEvolutions "any" extend function.
llvm-svn: 102156
2010-04-23 01:51:29 +00:00
Dan Gohman
e9135cb3fb
Revert 102135, 102129, 102127, 102106, 102104, 102102, 102012, 102004,
...
because 102004 causes codegen to emit invalid assembly on at least
x86_64-unknown-gnu-linux.
llvm-svn: 102155
2010-04-23 01:18:53 +00:00
Chris Lattner
95b0ff445c
reject invalid comma stuff with a message. We reject the case in
...
PR6888 with:
$ llvm-as t.ll
llvm-as: t.ll:2:29: error: expected metadata or 'align'
store <3 x i32> %x, i32 1, i32 1>, <3 x i32>* %p
^
instead of:
$ llvm-as t.ll
llvm-as:
llvm-svn: 102154
2010-04-23 00:50:50 +00:00
Chris Lattner
d8d898dbd3
disable my previous inliner patch, it appears to be busting self-host.
...
llvm-svn: 102153
2010-04-23 00:41:03 +00:00
Chris Lattner
2eee5d3467
The inliner was choosing to not consider call sites
...
that appear in the SCC as a result of inlining as candidates
for inlining. Change this so that it *does* consider call
sites that change from being indirect to being direct as a
result of inlining. This allows it to completely
"devirtualize" the testcase.
llvm-svn: 102146
2010-04-22 23:37:35 +00:00
Jim Grosbach
825cb299cd
Update ARM DAGtoDAG for matching UBFX instruction for unsigned bitfield
...
extraction. This fixes PR5998.
llvm-svn: 102144
2010-04-22 23:24:18 +00:00
Dan Gohman
ffc9a6b4ac
Add an initial description of a new concept: trap values, and change
...
the definition of the nsw and nuw flags to make use of it.
nsw was introduced to help optimizers answer yes to the following:
// Can we change i from i32 to i64 to eliminate the cast inside the loop?
for (int i = 0; i < n; ++i) A[i] *= 0.1;
// Can we assume that this loop will eventually terminate?
for (int i = 0; i <= n; ++i) A[i] *= 0.1;
In its current form, it isn't truly sufficient for either.
In the first case, if the increment overflows, it'll still have some
valid i32 value; sign-extending it will produce a value which is 33
homogeneous sign bits trailed by 31 independent undef bits. If i is
promoted to i64, it won't have those same values when it reaches that
point. (The compiler could recover here by reasoning about how i is
used by the load, but that's a lot more complicated and isn't always
possible.)
In the second case, there is no value for i which will be greater than
n, so having the increment return undef on overflow doesn't help.
Trap values are a formalization of some existing concepts that we have
about LLVM IR, and give the optimizers a better basis for answering yes
to both questions above.
llvm-svn: 102140
2010-04-22 23:14:21 +00:00
Chris Lattner
4ba01ec869
refactor the interface to InlineFunction so that most of the in/out
...
arguments are handled with a new InlineFunctionInfo class. This
makes it easier to extend InlineFunction to return more info in the
future.
llvm-svn: 102137
2010-04-22 23:07:58 +00:00
Devang Patel
894874e7af
Remove the test for now.
...
llvm-svn: 102135
2010-04-22 22:06:28 +00:00
Chris Lattner
64694df564
add macruby back
...
llvm-svn: 102132
2010-04-22 21:34:16 +00:00
Chris Lattner
016c00a311
when inlining something like this:
...
define void @f3(void (i8*)* %__f) ssp {
entry:
call void %__f(i8* undef)
unreachable
}
define void @f4(i8* %this) ssp align 2 {
entry:
call void @f3(void (i8*)* @f2) ssp
ret void
}
The inliner is turning the indirect call to %__f into a direct
call to F2. Make the call graph more precise when this happens.
The inliner doesn't revisit call sites introduced by inlining,
so there isn't an easy way to test for this, but a more precise
callgraph is a good thing.
llvm-svn: 102131
2010-04-22 21:31:00 +00:00
Devang Patel
6adc5620ab
Add comment.
...
llvm-svn: 102129
2010-04-22 20:56:35 +00:00
Dan Gohman
5b43aa0ddd
Sink SelectionDAGBuilder's HandlePHINodesInSuccessorBlocks down
...
into SelectionDAGBuilder itself.
llvm-svn: 102128
2010-04-22 20:55:53 +00:00
Devang Patel
ea2744f4dc
Adjust debug range offsets for isWeakForLinker() functions.
...
llvm-svn: 102127
2010-04-22 20:52:00 +00:00
Dan Gohman
00365f967b
Add a blurb about the new LSR.
...
llvm-svn: 102126
2010-04-22 20:50:43 +00:00
Nick Lewycky
08a75abd51
The -condprop pass has been deleted.
...
llvm-svn: 102125
2010-04-22 20:48:34 +00:00
Dan Gohman
e6aa943949
The post-RA scheduler is currently off by default on x86.
...
llvm-svn: 102124
2010-04-22 20:47:28 +00:00
Dan Gohman
c594eab10f
Move HandlePHINodesInSuccessorBlocks functions out of SelectionDAGISel
...
and into SelectionDAGBuilder and FastISel.
llvm-svn: 102123
2010-04-22 20:46:50 +00:00
Douglas Gregor
c5b5c0591d
Add some verbiage about Clang to the 2.7 release notes
...
llvm-svn: 102121
2010-04-22 20:42:40 +00:00
Chris Lattner
055cf267db
add a DEBUG call so that -debug lists when CGSCCPM iterates.
...
Fix RefreshCallGraph to use CGN->replaceCallEdge instead of hand
rolling its own loop. replaceCallEdge properly maintains the
reference counts of the nodes, fixing a crash exposed by the
iterative callgraph stuff.
llvm-svn: 102120
2010-04-22 20:42:33 +00:00
Chris Lattner
0a3b5b4e39
eliminate dead #include.
...
llvm-svn: 102119
2010-04-22 20:41:10 +00:00
Evan Cheng
f1223bdec0
- It's not safe to promote rotates (at least not trivially).
...
- Some code refactoring.
llvm-svn: 102111
2010-04-22 20:19:46 +00:00
Dan Gohman
e149e9896c
Fix a comment.
...
llvm-svn: 102110
2010-04-22 20:06:42 +00:00
Dan Gohman
fd81254190
Move PHINodesToUpdate out of SelectionDAGBuilder and into
...
FunctionLoweringInfo, as it isn't SelectionDAG-specific. This isn't
completely natural, as PHI node state is not per-function but rather
per-basic-block, however there's currently no other convenient
per-basic-block state to group it with.
llvm-svn: 102109
2010-04-22 19:55:20 +00:00
Devang Patel
0fde4aeedd
Rename InsnAfterLabelMap and InsnBeforeLabelMap.
...
llvm-svn: 102106
2010-04-22 18:43:35 +00:00
Devang Patel
53f530d44c
Keep track of MCSymbol used to mark beginning of a function.
...
llvm-svn: 102104
2010-04-22 18:39:21 +00:00
Jim Grosbach
9628468d94
Add mention of ARM atomic builtin support
...
llvm-svn: 102103
2010-04-22 18:33:31 +00:00
Devang Patel
bae14a1cab
At this point Start and End are not null.
...
llvm-svn: 102102
2010-04-22 18:28:58 +00:00
Jim Grosbach
77f0f5b616
Update ARM frame index scavenging description
...
llvm-svn: 102101
2010-04-22 18:28:43 +00:00
Chris Lattner
0d34c06cf2
remove dupe
...
llvm-svn: 102100
2010-04-22 18:26:17 +00:00
Chris Lattner
77a23804b9
reword my incoherent babble into something that makes sense
...
from Wesley Peck!
llvm-svn: 102096
2010-04-22 17:39:38 +00:00
Chris Lattner
ad2804110b
two more projects.
...
llvm-svn: 102095
2010-04-22 17:28:36 +00:00
Chris Lattner
cecb923e78
add some notes from Matthieu Moy!
...
llvm-svn: 102093
2010-04-22 17:25:00 +00:00
Chris Lattner
28175bf916
improve tblgen doc, pointed out by Zhongxing.
...
llvm-svn: 102072
2010-04-22 16:45:27 +00:00
Wesley Peck
9bc5e8f45e
Fixing a typo in the "Clang project" section of the release notes.
...
llvm-svn: 102064
2010-04-22 14:19:00 +00:00
Wesley Peck
cad613decc
Small fix to the "Other Improvements and New Features" section of the release notes.
...
llvm-svn: 102063
2010-04-22 13:53:54 +00:00