Devang Patel
b156287ec5
Preserve line number information.
...
llvm-svn: 130450
2011-04-28 22:48:14 +00:00
Matt Beaumont-Gay
11bfa608b8
Coalesce some DEBUGs (moving an only-used-in-DEBUG variable's declaration into the DEBUG)
...
llvm-svn: 130448
2011-04-28 22:26:05 +00:00
Benjamin Kramer
4e13009d4f
We require threse bits to be zero, too.
...
This shouldn't happen in practice because the icmp would be a constant.
Add a check so we don't miscompile code if something goes wrong.
llvm-svn: 130446
2011-04-28 21:38:51 +00:00
Nick Lewycky
40c59f95d7
Only read *predecessor once so as to fix a theoretical issue where it changes
...
between two reads (threading).
Fix an off-by-one in the indirect counter table that I meant to revert after an
earlier experiment. Whoops!
Implement GCOV_PREFIX. Doesn't handle GCOV_PREFIX_STRIP yet.
Fix an off-by-one in string emission. Extra whoops!
Tolerate DISubprograms that have null Function*'s attached to them. I don't yet
understand what this means, but it happens when you have a global static with
a non-trivial constructor/destructor.
Fix a crash on switch statements with a single successor (default-only).
llvm-svn: 130443
2011-04-28 21:35:49 +00:00
Daniel Dunbar
a65f557314
Target/X86/MC: Add an option for disabling arith relaxation, for my own testing
...
purposes.
llvm-svn: 130438
2011-04-28 21:23:31 +00:00
Rafael Espindola
be5cb08cf8
Add the getExprForFDESymbol method that responsible for computing the
...
expressions used in the FDE to refer to symbols.
llvm-svn: 130437
2011-04-28 21:04:39 +00:00
Devang Patel
6cf2e6f447
Beautify debug info probe output.
...
llvm-svn: 130435
2011-04-28 20:46:18 +00:00
Ted Kremenek
16f206d185
Add MemoryBuffer::getBufferKind() to report whether a memory buffer uses malloc'ed or mmap'ed memory. This is for performance analysis.
...
llvm-svn: 130432
2011-04-28 20:34:18 +00:00
Devang Patel
5e9ca7876e
Remove DbgDeclare only if all uses are converted.
...
llvm-svn: 130431
2011-04-28 20:32:02 +00:00
Lenny Maiorani
1b1a9860d1
Remove bounded StringRef::compare() since nothing but Clang SA was using it and it is just as easy to use StringRef::substr() preceding StringRef::compare() to achieve the same thing.
...
llvm-svn: 130430
2011-04-28 20:20:12 +00:00
Eli Friedman
afc21e9be2
fast-isel sret calls, try 2. We actually do need to do something on x86-32. rdar://problem/9303592 .
...
llvm-svn: 130429
2011-04-28 20:19:12 +00:00
Benjamin Kramer
6c39b65886
Fix a comment.
...
llvm-svn: 130428
2011-04-28 20:09:57 +00:00
Chris Lattner
8e8a01ebb8
improve comment.
...
llvm-svn: 130426
2011-04-28 20:02:57 +00:00
Devang Patel
e7e53746f0
Do not lose line number info while eliminating tail call.
...
llvm-svn: 130419
2011-04-28 18:43:39 +00:00
Eli Friedman
73c94e2b24
Actually revert r130348 correctly.
...
llvm-svn: 130418
2011-04-28 18:20:24 +00:00
Chris Lattner
a4696ee0ac
final step needed to resolve PR6627, which allows us to flatten the code down to
...
a nice and tidy:
%x1 = load i32* %0, align 4
%1 = icmp eq i32 %x1, 1179403647
br i1 %1, label %if.then, label %if.end
instead of doing lots of loads and branches. May the FreeBSD bootloader
long fit in its allocated space.
llvm-svn: 130416
2011-04-28 18:15:47 +00:00
Chris Lattner
5307af1ed9
code cleanups only.
...
llvm-svn: 130414
2011-04-28 18:08:21 +00:00
Eli Friedman
7b68473355
Revert r130348; causing buildbot issues on x86-32.
...
llvm-svn: 130412
2011-04-28 18:06:10 +00:00
Owen Anderson
5ea854079d
Fix a bug in tblgen that caused incorrect encodings on instructions that specified operands with "bit" instead of "bits<1>".
...
Unfortunately, my only testcase for this is fragile, and the ARM AsmParser can't round trip the instruction in question.
<rdar://problem/9345702>
llvm-svn: 130410
2011-04-28 17:51:45 +00:00
Devang Patel
93273f5b87
Add command line option to print debug info in human readable form as comment in llvm IR output. This, i.e -enable-debug-info-comment, is very useful if you want to easily find out which optimization pass is losing line number information.
...
llvm-svn: 130409
2011-04-28 17:41:38 +00:00
Andrew Trick
db3db0337f
Reapply r130340: Fix for PR9730.
...
llvm-svn: 130408
2011-04-28 17:30:04 +00:00
Benjamin Kramer
4790d699e0
InstCombine: Merge "(trunc x) == C1 & (and x, CA) == C2" into a single and+icmp.
...
This happens when GVN widens loads. Part of PR6627.
llvm-svn: 130405
2011-04-28 16:58:40 +00:00
Eric Christopher
2e9c3e61ee
Be more layout aware here and swap the successor and branch condition
...
if it means we get a fallthrough.
llvm-svn: 130404
2011-04-28 16:52:09 +00:00
Chris Lattner
6fa384f4a7
centralize "marking for deletion" into a helper function. Pass GVN around to
...
static functions instead of passing around tons of random ivars.
llvm-svn: 130403
2011-04-28 16:36:48 +00:00
Chris Lattner
bc11964fe9
Promote toErase to be an ivar of the GVN class.
...
llvm-svn: 130401
2011-04-28 16:18:52 +00:00
Rafael Espindola
f75a67d261
Add a getExprForPersonalitySymbol method to MCAsmInfo. Use it when
...
converting the symbol passed to .cfi_personality into bytes is the file.
llvm-svn: 130400
2011-04-28 16:09:09 +00:00
Rafael Espindola
4f9a76ab0b
Mark the EH symbol global or weak if the corresponding function is.
...
llvm-svn: 130397
2011-04-28 12:50:37 +00:00
Jay Foad
97fa854251
Fix typos in comments.
...
llvm-svn: 130396
2011-04-28 09:12:47 +00:00
Chandler Carruth
bb0599c1f4
Fix the last -Wnon-pod-memset I'm seeing. This is benign, but appears
...
a bit more sinister as the memset doesn't do what the constructor does.
There seems to be a cleaner solution than a cast here though, instead we
can point the memset destination into the union its actually trying to
clear.
An alternative is to point to the Untyped member of this union. Review
appreciated, and if that is cleaner I'm happy to switch. All of these
should be functionally equivalent to the original code.
llvm-svn: 130395
2011-04-28 08:37:18 +00:00
Chandler Carruth
e4c22377a4
Revert an unintended commit. Very sorry for this one.
...
llvm-svn: 130393
2011-04-28 08:18:22 +00:00
Chandler Carruth
c01a726544
Fix more -Wnon-pod-memset warnings.
...
llvm-svn: 130392
2011-04-28 08:17:08 +00:00
Chandler Carruth
04ab0a5071
nuke gold
...
llvm-svn: 130391
2011-04-28 08:17:05 +00:00
Chris Lattner
594c4c5823
teach GVN to widen integer loads when they are overaligned, when doing an
...
wider load would allow elimination of subsequent loads, and when the wider
load is still a native integer type. This eliminates a ton of loads on
various benchmarks involving struct fields, though it is somewhat hobbled
by clang not being very aggressive about field alignment.
This is yet another step along the way towards resolving PR6627.
llvm-svn: 130390
2011-04-28 07:29:08 +00:00
Eric Christopher
bea4df9acc
Let the immediate leaf pattern take transforms and switch the signed
...
immediate patterns in arm to using the pattern.
Handles rdar://9299434
llvm-svn: 130386
2011-04-28 05:49:04 +00:00
Chris Lattner
61521f8481
move PR9803 to this readme.
...
llvm-svn: 130385
2011-04-28 05:33:16 +00:00
Ted Kremenek
2cd5c3603f
Add utility method to DenseMap to return the amount of memory used for its buckets.
...
llvm-svn: 130382
2011-04-28 04:52:57 +00:00
Rafael Espindola
7bc992c8d3
Add a small temporary hack for producing identical eh_frame sections on OS X.
...
This removes one of the main advantages of moving eh_frame to MC, but
makes the transition a lot easier to debug (run md5).
llvm-svn: 130379
2011-04-28 04:04:14 +00:00
Rafael Espindola
d63b896d05
Produce the EH_frame# symbols if needed.
...
llvm-svn: 130378
2011-04-28 03:26:11 +00:00
Rafael Espindola
d2ef63ca76
Forward isFunctionEHFrameSymbolPrivate. If it is false, produce the foo.eh
...
symbols.
llvm-svn: 130375
2011-04-28 02:46:42 +00:00
Devang Patel
900ceb725b
Teach dwarf writer to handle complex address expression for .debug_loc entries.
...
This fixes clang generated blocks' variables' debug info.
Radar 9279956.
llvm-svn: 130373
2011-04-28 02:22:40 +00:00
Chris Lattner
70762e6755
silence some -Wnon-pod-memset warnings, since std::pair is not POD.
...
llvm-svn: 130364
2011-04-28 00:55:53 +00:00
Eli Friedman
86181251f3
Fix a silly mistake in r130338.
...
llvm-svn: 130360
2011-04-28 00:42:03 +00:00
Justin Holewinski
a1728a7d40
PTX: support for select_cc and fixes for setcc
...
- expansion of SELECT_CC into SETCC
- force SETCC result type to i1
- custom selection for handling i1 using SETCC
Patch by Dan Bailey
llvm-svn: 130358
2011-04-28 00:19:56 +00:00
Justin Holewinski
a042c76db5
PTX: support for select
...
- selection of SELP instruction
- new selp.ll test
Patch by Dan Bailey
llvm-svn: 130357
2011-04-28 00:19:55 +00:00
Justin Holewinski
c1013e6801
PTX: mov fix and rounding correction for cvt
...
- fix typo in MOV
- correct fp rounding on CVT
- new cvt.ll test
Patch by Dan Bailey
llvm-svn: 130356
2011-04-28 00:19:54 +00:00
Justin Holewinski
405d24712b
PTX: support for fneg
...
- selection of FNEG instruction
- new fneg.ll test
Patch by Dan Bailey
llvm-svn: 130355
2011-04-28 00:19:53 +00:00
Justin Holewinski
8e5353495e
PTX: support for zext loads and trunc stores
...
- expansion of EXTLOAD and TRUNCSTORE instructions
Patch by Dan Bailey
llvm-svn: 130354
2011-04-28 00:19:52 +00:00
Justin Holewinski
bde9352742
PTX: support for bitwise operations on predicates
...
- selection of bitwise preds (AND, OR, XOR)
- new bitwise.ll test
Patch by Dan Bailey
llvm-svn: 130353
2011-04-28 00:19:51 +00:00
Justin Holewinski
520fdbc49f
PTX: patch to AsmPrinter
...
- immediate value cast as long not int
- handles initializer for constant array
Patch by Dan Bailey
llvm-svn: 130352
2011-04-28 00:19:50 +00:00
Andrew Trick
ad00466e83
Reverting r130340 in the unlikely event that it's responsible for a llvm-gcc stage2 compiler error.
...
llvm-svn: 130350
2011-04-28 00:13:59 +00:00