Evan Cheng
361b9be7c6
It's possible to sink a def if its local uses are PHI's.
...
llvm-svn: 111537
2010-08-19 18:33:29 +00:00
Michael J. Spencer
abca173494
Fix the msvc 2010 build.
...
The Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01
implements parts of C++0x based on the draft standard. An old version of
the draft had a bug that makes std::pair<T1*, T2*>(something, 0) fail to
compile. This is because the template<class U, class V> pair(U&& x, V&& y)
constructor is selected, even though it later fails to implicitly convert
U and V to frist_type and second_type.
This has been fixed in n3090, but it seems that Microsoft is not going to
update msvc.
llvm-svn: 111535
2010-08-19 18:16:39 +00:00
Dale Johannesen
370c77c064
Do not assert when reading an exponent out of range.
...
llvm-svn: 111534
2010-08-19 17:58:35 +00:00
Jim Grosbach
8c58bd30dc
Add Thumb1 support for virtual frame indices.
...
rdar://8277890
llvm-svn: 111533
2010-08-19 17:52:13 +00:00
Evan Cheng
681d0c25f9
Remove disabled assertion.
...
llvm-svn: 111531
2010-08-19 17:33:48 +00:00
Evan Cheng
ae9939c839
Teach machine-sink to break critical edges when appropriate. Work in progress.
...
llvm-svn: 111530
2010-08-19 17:33:11 +00:00
Daniel Dunbar
9262abdd8f
buildbot/valgrind: Update RegisterPass false positive suppression for API
...
changes.
llvm-svn: 111529
2010-08-19 17:21:21 +00:00
Daniel Dunbar
c1e296ed40
buildbot/valgrind: Suppress warnings about leaks in /bin/grep.
...
llvm-svn: 111528
2010-08-19 17:21:17 +00:00
Eric Christopher
8250e2fe7e
Re-re-revert this patch. It seems to be causing performance
...
and correctness regressions.
llvm-svn: 111527
2010-08-19 17:21:10 +00:00
Daniel Dunbar
0d7e9538db
tests: Haste makes waste.
...
llvm-svn: 111525
2010-08-19 16:47:54 +00:00
Daniel Dunbar
471a649c6b
tests: Ignore whitespace in llvm_supports_binding() and llvm_gcc_supports().
...
llvm-svn: 111524
2010-08-19 16:46:52 +00:00
Eric Christopher
a5d60c62b1
Silence warning.
...
llvm-svn: 111518
2010-08-19 15:35:27 +00:00
Benjamin Kramer
448886d5df
MCELF: Count the section orders properly. Patch by Roman Divacky.
...
llvm-svn: 111517
2010-08-19 13:44:49 +00:00
Kenneth Uildriks
d4b6ab9888
Fixed and reactivated a partial specialization test
...
llvm-svn: 111516
2010-08-19 12:42:38 +00:00
Eli Friedman
33087a7fe4
Use std::string instead of StringRef in ClangAttrEmitter.cpp; per report on
...
cfe-dev, fixes an error compiling with MSVC. Using a StringRef here doesn't
look safe in any case.
llvm-svn: 111513
2010-08-19 06:11:05 +00:00
Jim Grosbach
743d7c80e4
Update local stack block allocation to let PEI do the allocs if no additional
...
base registers were required. This will allow for slightly better packing
of the locals when alignment padding is necessary after callee saved registers.
llvm-svn: 111508
2010-08-19 02:47:08 +00:00
Dan Gohman
f71c521fb7
Revert r111199; it breaks -debug-pass=Structure output.
...
llvm-svn: 111500
2010-08-19 01:29:07 +00:00
Eric Christopher
a0d40e2b4c
Reapply the virtual register patch from 109102. The places where we were
...
depending on the number of virtual registers appear to have all been handled
now.
llvm-svn: 111499
2010-08-19 01:25:50 +00:00
Chris Lattner
f547740d3f
fix PR7465, mishandling of lcall and ljmp: intersegment long
...
call and jumps.
llvm-svn: 111496
2010-08-19 01:18:43 +00:00
Dan Gohman
129a816ee6
Process the step before the start, because it's usually the simpler
...
of the two.
llvm-svn: 111495
2010-08-19 01:02:31 +00:00
Chris Lattner
beb506eeed
minor progress towards fixing PR7465
...
llvm-svn: 111494
2010-08-19 01:00:34 +00:00
Eric Christopher
0d274a0258
Add an AddOptionalDefs method and use it.
...
llvm-svn: 111489
2010-08-19 00:37:05 +00:00
Daniel Dunbar
27b91a7410
lit/GoogleTest: Add .exe to the suffix when looking for tests.
...
llvm-svn: 111487
2010-08-19 00:22:45 +00:00
Alexis Hunt
db5382093d
Add include missing for VC build.
...
llvm-svn: 111484
2010-08-19 00:19:03 +00:00
Dale Johannesen
8d5f0208f2
Testcase for llvm-gcc checkin 111482.
...
llvm-svn: 111483
2010-08-19 00:09:07 +00:00
Bill Wendling
768d3b510c
Add the "isCompare" attribute to the defm instead of each individual instr.
...
llvm-svn: 111481
2010-08-19 00:05:48 +00:00
Alexis Hunt
fa9fd03e2d
Remove three spurious semicolons
...
llvm-svn: 111480
2010-08-19 00:03:05 +00:00
Jakob Stoklund Olesen
92d57cee61
Don't call Predicate_* in Mips.
...
llvm-svn: 111468
2010-08-18 23:56:46 +00:00
Eric Christopher
8a70781cac
Remove extra header.
...
llvm-svn: 111456
2010-08-18 23:38:16 +00:00
Alexis Hunt
1d2b159882
Finish full attribute class emission for clang.
...
For more information, see the accompanying clang patch.
llvm-svn: 111454
2010-08-18 23:23:09 +00:00
Jim Grosbach
3ac059369b
Add a newline to debug output
...
llvm-svn: 111453
2010-08-18 23:14:02 +00:00
Chris Lattner
3decde9305
refix PR1143 by making basicaa analyze zexts of indices aggresively,
...
which I broke with a recent patch.
llvm-svn: 111452
2010-08-18 23:09:49 +00:00
Evan Cheng
25b6068b8f
If any def of a machine-sink candidate has local uses, it's obviously not safe to sink it to a successor block. This bug has been hidden because a later check for critical-edge disable these illegal optimizations. This patch should significantly reduce the amount of time spent on checking dominator information for obviously unsafe sinking.
...
llvm-svn: 111450
2010-08-18 23:09:25 +00:00
Chris Lattner
26403acef7
GetLinearExpression is only called when TD is non-null, pass as
...
a reference instead of pointer.
llvm-svn: 111445
2010-08-18 22:52:09 +00:00
Chris Lattner
1b9c38796e
rework GEP decomposition to make a new VariableGEPIndex struct instead of
...
using a pair. This tidies up the code a bit. While setting things up, add
a (currently unused) field to keep track of how the value is extended.
llvm-svn: 111444
2010-08-18 22:47:56 +00:00
Jim Grosbach
dbfc2ce95d
Enable ARM base register reuse to local stack slot allocation. Whenever a new
...
frame index reference to an object in the local block is seen, check if
it's near enough to any previously allocaated base register to re-use.
rdar://8277890
llvm-svn: 111443
2010-08-18 22:44:49 +00:00
Dan Gohman
492c2ea31e
Add a testcase to verify that commands don't crash when they hit
...
errors on stderr.
llvm-svn: 111440
2010-08-18 22:35:56 +00:00
Dan Gohman
c825ceefb4
Make raw_fd_ostream consider itself the owner of STDOUT_FILENO when
...
constructed with an output filename of "-". In particular, allow the
file descriptor to be closed, and close the file descriptor in the
destructor if it hasn't been explicitly closed already, to ensure
that any write errors are detected.
llvm-svn: 111436
2010-08-18 22:26:19 +00:00
Dan Gohman
82656fb0e1
When sending stats output to stdout for grepping, don't emit normal
...
output to standard output also.
llvm-svn: 111435
2010-08-18 22:22:44 +00:00
Chris Lattner
9f7500f57b
move gep decomposition out of ValueTracking into BasicAA. The form of
...
decomposition that it is doing is very basicaa specific and is only used
by basicaa.
Now with less tree breakingness.
llvm-svn: 111433
2010-08-18 22:07:29 +00:00
Dan Gohman
3490ff4002
Tidy.
...
llvm-svn: 111432
2010-08-18 22:04:43 +00:00
Bill Wendling
ad2aa57774
Minor simplification. Gets rid of a needless temporary.
...
llvm-svn: 111430
2010-08-18 21:32:07 +00:00
Owen Anderson
80d19f0905
Use ConstantRange to propagate information through value definitions.
...
llvm-svn: 111425
2010-08-18 21:11:37 +00:00
Dan Gohman
2470818942
When sending stats output to stdout for grepping, don't emit normal
...
output to standard output also.
llvm-svn: 111401
2010-08-18 20:32:46 +00:00
Jakob Stoklund Olesen
e98030ad58
Thinking about it, we don't need MachineDominatorTree after all. The DomValue
...
map discovers the iterated dominance frontier for free.
llvm-svn: 111400
2010-08-18 20:29:53 +00:00
Dan Gohman
50377a366f
Introduce a ScopedFatalErrorHandler class to make it easy to register
...
fatal error handlers which automatically get unregistered at the end
of a scope.
llvm-svn: 111398
2010-08-18 20:16:39 +00:00
Jakob Stoklund Olesen
f4088b022a
Revert r111394. It was too aggressive.
...
We must complete the DFS, otherwise we might miss needed phi-defs, and
prematurely color live ranges with a non-dominating value.
This is not a big deal since we get to color more of the CFG and the next
mapValue call will be faster.
llvm-svn: 111397
2010-08-18 20:06:05 +00:00
Jakob Stoklund Olesen
5b4cb08471
Aggressively prune the DFS when inserting phi-defs.
...
llvm-svn: 111394
2010-08-18 19:00:11 +00:00
Jakob Stoklund Olesen
ce6f055b4d
Add the LiveIntervalMap class. Don't hook it up yet.
...
LiveIntervalMap maps values from a parent LiveInterval to a child interval that
is a strict subset. It will create phi-def values as needed to preserve the
VNInfo SSA form in the child interval.
This leads to an algorithm very similar to the one in SSAUpdaterImpl.h, but with
enough differences that the code can't be reused:
- We don't need to manipulate PHI instructions.
- LiveIntervals have kills.
- We have MachineDominatorTree.
- We can use df_iterator.
llvm-svn: 111393
2010-08-18 19:00:08 +00:00
Jakob Stoklund Olesen
2ba69d2313
Add df_iterator::getPathLength and getPath as a way of getting a path from the
...
entry node to the current node.
llvm-svn: 111392
2010-08-18 19:00:05 +00:00
Daniel Dunbar
fbeeb130d8
Revert r111375, "move gep decomposition out of ValueTracking into BasicAA. The
...
form of", it doesn't pass tests.
llvm-svn: 111385
2010-08-18 18:43:08 +00:00
Bill Wendling
0d323aef46
Improve whitespace.
...
llvm-svn: 111384
2010-08-18 18:41:13 +00:00
Bill Wendling
817e857b13
Marked with ATTRIBUTE_USED so that clang doesn't complain.
...
llvm-svn: 111383
2010-08-18 18:40:57 +00:00
Owen Anderson
208636fa33
Inform LazyValueInfo whenever a block is deleted, to avoid dangling pointer issues.
...
llvm-svn: 111382
2010-08-18 18:39:01 +00:00
Daniel Dunbar
8e92d9b68d
MC/ELF: Allow null values in virtual sections, ELF doesn't use special
...
directives for putting contents in .bss, for example.
llvm-svn: 111376
2010-08-18 18:22:37 +00:00
Chris Lattner
54fe883203
move gep decomposition out of ValueTracking into BasicAA. The form of
...
decomposition that it is doing is very basicaa specific and is only used
by basicaa.
llvm-svn: 111375
2010-08-18 18:22:17 +00:00
Jim Grosbach
e0e9b3013f
Add hook for re-using virtual base registers for local stack slot access.
...
Nothing fancy, just ask the target if any currently available base reg
is in range for the instruction under consideration and use the first one
that is. Placeholder ARM implementation simply returns false for now.
ongoing saga of rdar://8277890
llvm-svn: 111374
2010-08-18 17:57:37 +00:00
Dan Gohman
7ba6f22b47
Eliminate some redundancy by relying on raw_fd_ostream to handle "-"
...
properly.
llvm-svn: 111373
2010-08-18 17:55:15 +00:00
Dan Gohman
083330a8f2
Allow the -analyze option to follow the -o option, which defaults to
...
standard output, instead of just hardcoding outs().
llvm-svn: 111372
2010-08-18 17:42:59 +00:00
Dan Gohman
b01aed1cb2
Don't translate "-" to outs() manually; raw_ostream does that automatically.
...
llvm-svn: 111371
2010-08-18 17:40:10 +00:00
Dan Gohman
80f9de4bb5
Don't translate "-" to outs() manually; raw_ostream does that
...
automatically.
llvm-svn: 111370
2010-08-18 17:26:50 +00:00
Dan Gohman
6111d7c05b
Don't register stdout to be deleted on a signal.
...
llvm-svn: 111368
2010-08-18 17:21:42 +00:00
Dan Gohman
3d051ff2bc
Remove an unused command-line option.
...
llvm-svn: 111367
2010-08-18 17:20:51 +00:00
Jakob Stoklund Olesen
952a621d93
Preserve subregs on PHI source operands. Patch by Krister Wombell!
...
llvm-svn: 111366
2010-08-18 16:09:47 +00:00
Kalle Raiskila
e60b5161d1
Fix a bug with insertelement on SPU.
...
The previous algorithm in LowerVECTOR_SHUFFLE
didn't check all requirements for "monotonic" shuffles.
llvm-svn: 111361
2010-08-18 10:20:29 +00:00
Kalle Raiskila
ab49360f59
Remove all traces of v2[i,f]32 on SPU.
...
The "half vectors" are now widened to full size by the legalizer.
The only exception is in parameter passing, where half vectors are
expanded. This causes changes to some dejagnu tests.
llvm-svn: 111360
2010-08-18 10:04:39 +00:00
Kalle Raiskila
f3984d1ef6
Change SPU C calling convention to match that described in
...
"SPU Application Binary Interface Specification, v1.9" by
IBM.
Specifically: use r3-r74 to pass parameters and the return value.
llvm-svn: 111358
2010-08-18 09:50:30 +00:00
Chris Lattner
a25c05ed15
fix a buggy test
...
llvm-svn: 111354
2010-08-18 04:55:12 +00:00
Chris Lattner
a33edcb56c
fix PR7589: In brief:
...
gep P, (zext x) != gep P, (sext x)
DecomposeGEPExpression was getting this wrong, confusing
basicaa.
llvm-svn: 111352
2010-08-18 04:28:19 +00:00
Chris Lattner
c8e38eb60b
filecheckize and detrivialize.
...
llvm-svn: 111350
2010-08-18 04:25:43 +00:00
Chris Lattner
3c603024bb
Fix PR7755: knowing something about an inval for a pred
...
from the LHS should disable reconsidering that pred on the
RHS. However, knowing something about the pred on the RHS
shouldn't disable subsequent additions on the RHS from
happening.
llvm-svn: 111349
2010-08-18 03:14:36 +00:00
Chris Lattner
f0b5b67ba5
fit in 80 cols
...
llvm-svn: 111348
2010-08-18 03:13:35 +00:00
Chris Lattner
2edfdd289f
remove some dead code.
...
llvm-svn: 111345
2010-08-18 02:42:11 +00:00
Chris Lattner
b45de95345
remove some dead code.
...
llvm-svn: 111344
2010-08-18 02:41:56 +00:00
Chris Lattner
3e3e63efe1
remove some code that is dead now that lea's are modeled with segment registers.
...
llvm-svn: 111343
2010-08-18 02:40:44 +00:00
Chris Lattner
6aabb66139
remove dead prototype.
...
llvm-svn: 111342
2010-08-18 02:37:06 +00:00
Bob Wilson
fb7eaff759
Expand ZERO_EXTEND operations for NEON vector types.
...
Testcase from Nick Lewycky.
llvm-svn: 111341
2010-08-18 01:45:52 +00:00
Dan Gohman
a610304ed9
Fix the "Finished Creating" messages for aliases to print the
...
right name.
llvm-svn: 111340
2010-08-18 01:35:53 +00:00
Dan Gohman
44790e7aa7
Revert r111321. This doesn't fix a problem.
...
llvm-svn: 111339
2010-08-18 01:34:52 +00:00
Chris Lattner
b91c903f46
stomp some more undefined behavior, PR7775.
...
llvm-svn: 111337
2010-08-18 00:33:47 +00:00
Chris Lattner
816191bcad
don't emit zero bit fields with Emit, fixing undefined behavior,
...
PR7778
llvm-svn: 111336
2010-08-18 00:29:18 +00:00
Chris Lattner
03e17f8387
Don't pass in a null pointer to std::string's ctor, an empty string
...
ref should produce an empty std::string. This fixes PR7879.
llvm-svn: 111332
2010-08-18 00:11:25 +00:00
Chris Lattner
249b976ed2
fix a broken link
...
llvm-svn: 111326
2010-08-17 23:26:04 +00:00
Chris Lattner
7aa9eb16fd
include config.h to get config params, hopefully unbreaking mingw builder.
...
llvm-svn: 111325
2010-08-17 23:22:10 +00:00
Chris Lattner
ce3b2c3f77
Fix the rest of rdar://8318441 which happens when a raw_fd_ostream
...
(e.g. errs()) fails in close() due to (e.g.) a broken pipe. As
previously written, the had_error() flag would get set and then
the raw_ostream dtor would report a fatal error. There is nothing
the client can do about this and we have no way to report the error,
so just eat it.
llvm-svn: 111321
2010-08-17 23:11:56 +00:00
Chris Lattner
6217082dc3
report_fatal_error can't use errs(), because errs() can call
...
into report_fatal_error. Just blast the string to stderr with write(2)
and hope for the best! Part of rdar://8318441
llvm-svn: 111320
2010-08-17 23:03:53 +00:00
Eric Christopher
51edc7b7e1
Temporarily revert r110987 as it's causing some miscompares in
...
vector heavy code. I'll re-enable when we've tracked down the problem.
llvm-svn: 111318
2010-08-17 22:55:27 +00:00
Dan Gohman
ed2b005842
Tweak IVUsers' concept of "interesting" to exclude add recurrences
...
where the step value is an induction variable from an outer loop, to
avoid trouble trying to re-expand such expressions. This effectively
hides such expressions from indvars and lsr, which prevents them
from getting into trouble.
llvm-svn: 111317
2010-08-17 22:50:37 +00:00
Jim Grosbach
3cf08661f4
Add materialization of virtual base registers for frame indices allocated into
...
the local block. Resolve references to those indices to a new base register.
For simplification and testing purposes, a new virtual base register is
allocated for each frame index being resolved. The result is truly horrible,
but correct, code that's good for exercising the new code paths.
Next up is adding thumb1 support, which should be very simple. Following that
will be adding base register re-use and implementing a reasonable ARM
heuristic for when a virtual base register should be generated at all.
llvm-svn: 111315
2010-08-17 22:41:55 +00:00
Evan Cheng
efdc74ea59
Add nounwind.
...
llvm-svn: 111312
2010-08-17 22:35:20 +00:00
Daniel Dunbar
09b0c78918
CrashRecovery: Clear the current context on the first crash, to avoid re-entering it if the cleanup code crashes.
...
llvm-svn: 111309
2010-08-17 22:32:39 +00:00
Daniel Dunbar
b30266ed20
CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active context from anywhere.
...
llvm-svn: 111308
2010-08-17 22:32:37 +00:00
Daniel Dunbar
ff329942cd
CrashRecovery: Make CrashRecoveryContext static methods thread safe.
...
llvm-svn: 111307
2010-08-17 22:32:34 +00:00
Dale Johannesen
16f96445c3
Make fast scheduler handle asm clobbers correctly.
...
PR 7882. Follows suggestion by Amaury Pouly, thanks.
llvm-svn: 111306
2010-08-17 22:17:24 +00:00
Anton Korobeynikov
88c09879c7
Revert part of one of the prev. patches - tailjmp will follow later.
...
llvm-svn: 111291
2010-08-17 21:08:28 +00:00
Anton Korobeynikov
231ab847ca
More fixes for win64:
...
- Do not clobber al during variadic calls, this is AMD64 ABI-only feature
- Emit wincall64, where necessary
Patch by Cameron Esfahani!
llvm-svn: 111289
2010-08-17 21:06:07 +00:00
Anton Korobeynikov
cd78af6e3c
Enable more win64 calls folding opportunities.
...
Patch by Cameron Esfahani!
llvm-svn: 111288
2010-08-17 21:06:01 +00:00
Anton Korobeynikov
14be4dff8e
Add some win64 coff goodness.
...
Patch by Cameron Esfahani!
llvm-svn: 111287
2010-08-17 21:05:54 +00:00
Evan Cheng
16bfe5b0f5
PHI elimination shouldn't require machineloopinfo since it's used at -O0. Move the requirement to LiveIntervalAnalysis instead. Note this does not change the number of times machineloopinfo is computed.
...
llvm-svn: 111285
2010-08-17 21:00:37 +00:00
Evan Cheng
e0db9d01d9
Machine CSE preserves CFG. Pass manager was freeing machineloopinfo after machine cse before.
...
llvm-svn: 111281
2010-08-17 20:57:42 +00:00