Bill Wendling
ebb4486a84
Fix verification failure.
...
llvm-svn: 68531
2009-04-07 18:52:30 +00:00
Bill Wendling
bf448a1010
Offer an explanation of why building LLVM-GCC with objdir == srcdir doesn't
...
work.
llvm-svn: 68530
2009-04-07 18:51:13 +00:00
Bill Wendling
1ae487bad5
Another reformatting. No change in docs.
...
llvm-svn: 68528
2009-04-07 18:40:56 +00:00
Torok Edwin
73312b3f39
Another attempt at fixing PR2975.
...
Types can have references to eachother, so we can't just call destroy on them.
llvm-svn: 68523
2009-04-07 17:23:02 +00:00
Chris Lattner
d805e262cb
fix comment to reflect the implementation I ended up settling on.
...
Thanks to Duncan for noticing this
llvm-svn: 68518
2009-04-07 16:30:31 +00:00
Chris Lattner
321741af5f
fix rdar://6762290, a crash compiling cxx filt with clang.
...
llvm-svn: 68500
2009-04-07 05:03:34 +00:00
Chris Lattner
73ab815c27
Add an API for the bitstream reader to read blobs and return
...
them by reference, instead of packing each byte into a
smallvector.
llvm-svn: 68486
2009-04-07 02:56:46 +00:00
Chris Lattner
47d6e7b93e
remove empty section
...
llvm-svn: 68485
2009-04-07 02:55:53 +00:00
Chris Lattner
2ed6a20934
stub out code for reading record with blobs as blobs. Not active yet.
...
llvm-svn: 68472
2009-04-06 22:44:40 +00:00
Chris Lattner
691c10a45b
allow clients to look up abbrev id's
...
llvm-svn: 68471
2009-04-06 22:43:46 +00:00
Chris Lattner
1df12baca9
Add a new EmitRecordWithBlob API that allows a blob to be emitted
...
without converting each byte to a uint64_t to stick in a SmallVector.
llvm-svn: 68469
2009-04-06 22:26:26 +00:00
Chris Lattner
4bda28e765
add a new Blob encoding abbreviation for bitcode files that emits
...
elements in a form that is efficient for the reader to just get a
pointer in memory and start reading. APIs to do efficient reading
and writing are still todo.
llvm-svn: 68465
2009-04-06 21:50:39 +00:00
Bob Wilson
0669f6d295
Handle 'a' modifier in ARM inline assembly.
...
Patch by Richard Pennington.
llvm-svn: 68464
2009-04-06 21:46:51 +00:00
Chris Lattner
13195e0718
split ReadAbbreviatedLiteral out of ReadAbbreviatedField.
...
llvm-svn: 68463
2009-04-06 21:37:10 +00:00
Chris Lattner
15b6b3bae7
reduce indentation with early-out
...
llvm-svn: 68462
2009-04-06 21:34:58 +00:00
Chris Lattner
6a2d8070bd
simplify code a bit.
...
llvm-svn: 68461
2009-04-06 21:20:01 +00:00
Chris Lattner
4918f64413
simplify to reduce indentation.
...
llvm-svn: 68460
2009-04-06 21:12:29 +00:00
Torok Edwin
839026562c
revert r68457, its crashing in make check.
...
llvm-svn: 68459
2009-04-06 20:57:34 +00:00
Chris Lattner
b9e07fd297
Teach llvm-bcanalyzer to skip over the header we use on LLVM IR files.
...
llvm-svn: 68458
2009-04-06 20:54:32 +00:00
Torok Edwin
96dadc3b63
fix (part of) memory leak on shutdown. See PR2975.
...
llvm-svn: 68457
2009-04-06 20:49:21 +00:00
Chris Lattner
28e2cd8090
clean up some html
...
llvm-svn: 68456
2009-04-06 20:35:19 +00:00
Mike Stump
82d7cfda21
Avoid -O3 on Darwin for now.
...
llvm-svn: 68455
2009-04-06 19:58:11 +00:00
Ed Schouten
01aa6ec97a
Let the strcat optimizer return the pointer to the start of the buffer,
...
instead of the place where it started to perform the string copy.
- PR3661
- Patch by Benjamin Kramer!
llvm-svn: 68443
2009-04-06 13:06:48 +00:00
Sanjiv Gupta
0b08df8c09
Map stack based frameindices for spills to zero based indices that can be accessed based on an external symbol defining the location of temporary data for a function. For example: we have spill slots addressed as foo.tmp + 0, foo.tmp + 1 etc.
...
llvm-svn: 68442
2009-04-06 10:54:50 +00:00
Bill Wendling
d231f8a592
Add character encoding declaration to fix verification warning.
...
llvm-svn: 68440
2009-04-05 12:38:44 +00:00
Bill Wendling
b95325c543
Obsessively format this document.
...
llvm-svn: 68439
2009-04-05 12:37:44 +00:00
Mikhail Glushenkov
b5fe65091d
Add segment flag bits to ELF.h.
...
llvm-svn: 68438
2009-04-05 09:07:08 +00:00
Bill Wendling
b4d7102417
Add character encoding declaration.
...
llvm-svn: 68433
2009-04-05 00:44:06 +00:00
Bill Wendling
9216ac0bcc
Fix validation error.
...
llvm-svn: 68432
2009-04-05 00:43:04 +00:00
Bill Wendling
b38e198f02
A lot of formatting changes.
...
llvm-svn: 68431
2009-04-05 00:41:19 +00:00
Oscar Fuentes
fff33a3cdf
CMake: Added notes pointing to the LLVM CMake documentation.
...
llvm-svn: 68429
2009-04-04 22:52:02 +00:00
Oscar Fuentes
bda403b4c8
CMake: defines and uses macro add_llvm_definitions for keeping track
...
of compiler parameters explicitly added by the build
specification. This macro replaces the cmake built-in
`add_definitions'.
Detects glibc and defines _GNU_SOURCE accordingly.
Resolves bug 3882.
llvm-svn: 68428
2009-04-04 22:41:07 +00:00
Bill Wendling
3b779984b4
Fix some HTML validation errors.
...
llvm-svn: 68427
2009-04-04 22:36:02 +00:00
Bill Wendling
e1a070b6e3
General clean-up of the bitcode format documentation. Having the paragraphs
...
formatted the same, putting words in <tt> tags, adding —s, etc.
llvm-svn: 68426
2009-04-04 22:27:03 +00:00
Nick Lewycky
4717538b1c
Try SSE2?
...
llvm-svn: 68423
2009-04-04 10:24:24 +00:00
Nick Lewycky
b294e31e83
CloneModule stores the BasicBlock mapping in ValueMap. There's no need to
...
recompute it. This fixes a O(n^2) in number of blocks when reducing a crash.
llvm-svn: 68422
2009-04-04 09:39:23 +00:00
Nick Lewycky
0bb65f44fa
Remove bogus include.
...
llvm-svn: 68421
2009-04-04 07:42:46 +00:00
Nick Lewycky
49f891958f
Add support for embedded metadata to LLVM. This introduces two new types of
...
Constant, MDString and MDNode which can only be used by globals with a name
that starts with "llvm." or as arguments to a function with the same naming
restriction.
llvm-svn: 68420
2009-04-04 07:22:01 +00:00
Nick Lewycky
734dee287d
Fix test on non-x86 platforms.
...
llvm-svn: 68419
2009-04-04 07:20:43 +00:00
Stefanus Du Toit
6c7917a844
Test commit access to LLVM with some minor narcissism.
...
llvm-svn: 68408
2009-04-03 21:41:52 +00:00
Bob Wilson
6bedd59894
Wrap some lines to fix indentation problems.
...
llvm-svn: 68405
2009-04-03 21:08:42 +00:00
Bob Wilson
d24b794f31
Fix some comments.
...
llvm-svn: 68404
2009-04-03 20:53:25 +00:00
Bill Wendling
184064484b
Duplicate entry.
...
llvm-svn: 68401
2009-04-03 20:32:13 +00:00
Chris Lattner
3a88fa0ff8
"This adds a getName() method to TargetRegisterClass, just like in TargetRegisterInfo.
...
This makes debugging register classes a bit easier."
Patch by Jakob Stoklund Olesen!
llvm-svn: 68400
2009-04-03 20:25:41 +00:00
Chris Lattner
eaa52bc29b
"Add documentation about the fix for missing x86
...
target library in windows under the "Common problems" section."
Patch by Stefanus Du Toit!
llvm-svn: 68399
2009-04-03 20:23:52 +00:00
Dan Gohman
8bff8a1e87
Fix a TargetLowering optimization so that it doesn't duplicate
...
loads when an input node has multiple uses.
llvm-svn: 68398
2009-04-03 20:11:30 +00:00
Daniel Dunbar
99c54d7fb0
Add fast path for raw_ostream output of strings.
...
- Particularly nice for small constant strings, which get optimized
down nicely. On a synthetic benchmark writing out "hello" in a
loop, this is about 2x faster with gcc and 3x faster with
llvm-gcc. llc on insn-attrtab.bc from 403.gcc is about .5% faster.
- I tried for a fancier solution which wouldn't increase code size as
much (by trying to match constant arrays), but can't quite make it
fly.
llvm-svn: 68396
2009-04-03 18:43:17 +00:00
Oscar Fuentes
cf03f4b041
CMake: tools/llvm-config/CMakeLists.txt: Use ! instead of comma as
...
separator in sed scripts. Resolves Bug 3881.
llvm-svn: 68385
2009-04-03 12:16:32 +00:00
Oscar Fuentes
f4de47b91e
CMake: removed IA64AsmPrinter.cpp from lib/Target/IA64/CMakeLists.txt
...
llvm-svn: 68384
2009-04-03 12:11:43 +00:00
Anton Korobeynikov
06d2d8ba72
Separate MIPS asmprinter
...
llvm-svn: 68383
2009-04-03 10:41:41 +00:00
Anton Korobeynikov
354171f060
Fix target library name
...
llvm-svn: 68382
2009-04-03 10:41:17 +00:00
Anton Korobeynikov
b1cce77929
Fix comment
...
llvm-svn: 68381
2009-04-03 10:41:00 +00:00
Anton Korobeynikov
547b43a809
Move IA64 asmprinter to separate library
...
llvm-svn: 68380
2009-04-03 10:38:51 +00:00
Mon P Wang
9c186c5d27
Added a x86 dag combine to increase the chances to use a
...
movq for v2i64 on x86-32.
llvm-svn: 68368
2009-04-03 02:43:30 +00:00
Chris Lattner
0fc36ca69d
update some syntax
...
llvm-svn: 68362
2009-04-03 00:29:19 +00:00
Chris Lattner
ce32794bf2
Work around an apparent GCC miscompilation by specializing different,
...
this fixes a regression on some compilers from r68147.
llvm-svn: 68356
2009-04-03 00:26:01 +00:00
Dan Gohman
b425feb2aa
Delete ISD::INSERT_SUBREG and ISD::EXTRACT_SUBREG, which are unused.
...
Note that these are distinct from TargetInstrInfo::INSERT_SUBREG
and TargetInstrInfo::EXTRACT_SUBREG, which are used.
llvm-svn: 68355
2009-04-03 00:25:26 +00:00
Chris Lattner
caf534cfcf
correct patch
...
llvm-svn: 68353
2009-04-03 00:10:56 +00:00
Chris Lattner
8185fe521c
add patch to go along with r68350
...
llvm-svn: 68352
2009-04-03 00:10:31 +00:00
Chris Lattner
206f75e7d2
use higher level APIs.
...
llvm-svn: 68351
2009-04-03 00:02:39 +00:00
Chris Lattner
ddb2e9f7f7
add missing *
...
llvm-svn: 68350
2009-04-02 23:53:03 +00:00
Sanjiv Gupta
e9cff3328f
Fixed build warnings.
...
llvm-svn: 68333
2009-04-02 18:33:12 +00:00
Sanjiv Gupta
cc841a3810
To convert the StopPoint insn into an assembler directive by ISel, we need to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize.
...
llvm-svn: 68329
2009-04-02 18:03:10 +00:00
Sanjiv Gupta
1e8860a8f5
Params are not being generated as static globals now. The caller passes them onto the callee's stack directly and the callee loads the argvals from its own stack. Clang generated frameindexes validatd by recalculating the stack as if all frameindexes represent 1-byte slots.
...
llvm-svn: 68327
2009-04-02 17:42:00 +00:00
Chris Lattner
720683752e
fix overflow checks in SmallVector:
...
"The code was doing "if (End+NumInputs > Capacity) ...". If End is
close to 0xFFFFFFFF and NumInputs is large, it'll overflow, the
condition will come out false, and the vector won't grow to
accommodate the new elements, and the program will crash in memmove."
Patch by Jeffrey Yasskin!
llvm-svn: 68277
2009-04-02 03:06:26 +00:00
Mikhail Glushenkov
12062ba83d
Fix build on Linux.
...
llvm-svn: 68269
2009-04-02 01:11:37 +00:00
Owen Anderson
98f912bf13
Reapply r68211, with the miscompilations it caused fixed.
...
llvm-svn: 68262
2009-04-01 23:53:49 +00:00
Bill Wendling
66b3fffa60
Make the constants fit.
...
llvm-svn: 68258
2009-04-01 22:44:18 +00:00
Devang Patel
ec9c58f7e5
Clean up pass manager cache after each run.
...
llvm-svn: 68254
2009-04-01 22:34:41 +00:00
Chris Lattner
d2eb0a63a1
silence warning in release-asserts build.
...
llvm-svn: 68253
2009-04-01 22:14:45 +00:00
Daniel Dunbar
4abd56677d
Add llvm::Triple class for abstracting access to target triples.
...
- The code is silly, I'm just amusing myself. Rewrite to be efficient
if you like. :)
Also, if you wish to debate the proper names of the triple components
I'm all ears.
llvm-svn: 68252
2009-04-01 21:53:23 +00:00
Misha Brukman
7182686dbf
Fixed file header comment.
...
llvm-svn: 68250
2009-04-01 21:37:19 +00:00
Misha Brukman
1757a810ce
Added tests for math utility functions; fixed another test's header comment.
...
llvm-svn: 68249
2009-04-01 21:36:40 +00:00
Misha Brukman
cb943df724
Fixed spelling.
...
llvm-svn: 68248
2009-04-01 21:33:08 +00:00
Devang Patel
e2ff483afd
Remove dead code.
...
llvm-svn: 68246
2009-04-01 21:27:08 +00:00
Chris Lattner
d978cc5c63
add this to SVN to allow collaborative hacking.
...
llvm-svn: 68243
2009-04-01 21:11:04 +00:00
Chris Lattner
807a0f207d
Add range insert method for DenseSet and define DenseMapInfo for chars.
...
Patch by Kevin Fan!
llvm-svn: 68239
2009-04-01 19:50:49 +00:00
Evan Cheng
856e339241
Recognize arm triplets.
...
llvm-svn: 68229
2009-04-01 18:54:56 +00:00
Dan Gohman
cff6953c45
Use CHAR_BIT instead of hard-coding 8 in several places where it
...
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.
llvm-svn: 68227
2009-04-01 18:45:54 +00:00
Ted Kremenek
061cf25072
Constify method to make VC++ happy. Patch by Brian Diekelman!
...
llvm-svn: 68222
2009-04-01 18:24:22 +00:00
Dan Gohman
0170402fe8
Use LLVM type names instead of C type names in comments, to be
...
less ambiguous and less C-specific.
llvm-svn: 68219
2009-04-01 18:10:16 +00:00
Bob Wilson
cf1ec2cc68
Fix PR3862: Recognize some ARM-specific constraints for immediates in inline
...
assembly.
llvm-svn: 68218
2009-04-01 17:58:54 +00:00
Dan Gohman
c4971721ea
Revert r68172. It caused regressions in
...
Applications/Burg/burg
Applications/ClamAV/clamscan
and many other tests.
llvm-svn: 68211
2009-04-01 16:37:47 +00:00
Misha Brukman
23fe17f55b
Fixed spelling.
...
llvm-svn: 68209
2009-04-01 16:13:29 +00:00
Ted Kremenek
d28577651e
CMake: Have generated Xcode projects also contain the LLVM header files.
...
llvm-svn: 68206
2009-04-01 15:40:21 +00:00
Nick Lewycky
9a196c0119
Detect that we're building from a git checkout like we do for cvs and svn.
...
Based on a patch by Nicolas Trangez on the unladen-swallow mailing list!
llvm-svn: 68187
2009-04-01 04:39:25 +00:00
Chris Lattner
7e06443d44
hopefully fix an apparent build error on windows.
...
llvm-svn: 68175
2009-04-01 02:03:38 +00:00
Chris Lattner
647cffba61
fix a serious regression I introduced in my previous patch.
...
llvm-svn: 68173
2009-04-01 01:43:03 +00:00
Owen Anderson
ff5961b46c
Enhance GVN to propagate simple conditionals. This fixes PR3921.
...
llvm-svn: 68172
2009-04-01 01:20:45 +00:00
Misha Brukman
7f1f0b03e2
include Makefile.common before using $(BuildMode) to get its definition
...
llvm-svn: 68167
2009-04-01 00:35:00 +00:00
Misha Brukman
5fc1a0339c
* Fixed spelling of `invertible'
...
* Simplified if statement
llvm-svn: 68163
2009-04-01 00:15:46 +00:00
Douglas Gregor
a9d1032f9c
Allow the use of pointers to const within PointerUnion.
...
llvm-svn: 68159
2009-03-31 23:19:54 +00:00
Chris Lattner
169b2f191d
add a converting operator
...
llvm-svn: 68158
2009-03-31 23:09:51 +00:00
Chris Lattner
2d8cd80ee0
reimplement BitcodeReaderValueList in terms of WeakVH instead of making
...
it be an LLVM IR User object.
llvm-svn: 68156
2009-03-31 22:55:09 +00:00
Chris Lattner
f72ce6ea8b
Make the key of ValueRankMap an AssertingVH, so that we die violently
...
if it dangles.
llvm-svn: 68150
2009-03-31 22:13:29 +00:00
Chris Lattner
90234f34c6
Add two new classes: WeakVH and AssertingVH. These are both "ValueHandles",
...
which are effectively smart pointers to Value*'s. They are both very light
weight and simple, and react to values being destroyed or being RAUW'd.
WeakVN does a best effort to follow a value around, including through RAUW
operations and will get nulled out of the value is destroyed. This is useful
for the eventual "metadata that references a value" work, because it is a
reference to a value that does not show up on its use_* list.
AssertingVH is a pointer that compiles down to a dumb raw pointer when
assertions are disabled. When enabled, it emits an assertion if the
pointed-to value is destroyed while it is still being referenced. This
is very useful for Maps and other things, and should have caught the recent
bugs in CallGraph and Reassociate, for example.
llvm-svn: 68149
2009-03-31 22:11:05 +00:00
Chris Lattner
e756f15703
teach PointerLikeTypeTraits that all pointers to pointers may only be 4-byte aligned.
...
llvm-svn: 68147
2009-03-31 21:28:39 +00:00
Chris Lattner
e0d25e42e9
add some accessors so I can play games with DenseMaps.
...
llvm-svn: 68145
2009-03-31 20:57:23 +00:00
Evan Cheng
826b6f0f7c
Throttle back "fold select into operand" transformation. InstCombine should not generate selects of two constants unless they are selects of 0 and 1.
...
e.g.
define i32 @t1(i32 %c, i32 %x) nounwind {
%t1 = icmp eq i32 %c, 0
%t2 = lshr i32 %x, 18
%t3 = select i1 %t1, i32 %t2, i32 %x
ret i32 %t3
}
was turned into
define i32 @t2(i32 %c, i32 %x) nounwind {
%t1 = icmp eq i32 %c, 0
%t2 = select i1 %t1, i32 18, i32 0
%t3 = lshr i32 %x, %t2
ret i32 %t3
}
For most targets, that means materializing two constants and then a select. e.g. On x86-64
movl %esi, %eax
shrl $18, %eax
testl %edi, %edi
cmovne %esi, %eax
ret
=>
xorl %eax, %eax
testl %edi, %edi
movl $18, %ecx
cmovne %eax, %ecx
movl %esi, %eax
shrl %cl, %eax
ret
Also, the optimizer and codegen can reason about shl / and / add, etc. by a constant. This optimization will hinder optimizations using ComputeMaskedBits.
llvm-svn: 68142
2009-03-31 20:42:45 +00:00
Evan Cheng
0d551591ea
Fully general expansion of integer shift of any size.
...
llvm-svn: 68134
2009-03-31 19:39:24 +00:00
Evan Cheng
d9d6e427d6
i128 shift libcalls are not available on x86.
...
llvm-svn: 68133
2009-03-31 19:38:51 +00:00
Dan Gohman
6b42dfddf4
Reapply 68073, with fixes. EH Landing-pad basic blocks are not
...
entered via fall-through. Don't miss fallthroughs from blocks
terminated by conditional branches. Also, move
isOnlyReachableByFallthrough out of line.
llvm-svn: 68129
2009-03-31 18:39:13 +00:00
Mikhail Glushenkov
eccc5967bf
Do not pass '-relocation-model=pic' to llc.
...
Does not work well on 32 bit targets. Bug reported by Albert Graef.
This patch also adds new "-Wllc,option" syntax to pass options to llc.
llvm-svn: 68127
2009-03-31 18:33:54 +00:00
Douglas Gregor
1d249d984c
Stop guessing, start thinking, and make PointerUnion3::is actually be correct.
...
llvm-svn: 68126
2009-03-31 18:31:03 +00:00
Dan Gohman
6161b3ccf6
Add an explicit -asm-verbose to these tests, to make it
...
possible to run the tests with -asm-verbose defaulting
to false.
llvm-svn: 68124
2009-03-31 18:20:47 +00:00
Devang Patel
4ce6e69022
Update call graph after inlining invoke.
...
Patch by Jay Foad.
llvm-svn: 68120
2009-03-31 17:36:12 +00:00
Daniel Dunbar
fb1a6eb69b
Add llvm::sys::getHostTriple and remove
...
llvm::sys::getOS{Name,Version}.
Right now the implementation just derives from LLVM_HOSTTRIPLE (which
is wrong, but it doesn't look like we have a define for the target
triple). Ideally this routine would actually be able to compute the
triple for targets we care about.
llvm-svn: 68118
2009-03-31 17:30:15 +00:00
Dan Gohman
d51f196ff5
Minor top-level comment fix.
...
llvm-svn: 68113
2009-03-31 16:51:18 +00:00
Dan Gohman
90ea62cba6
Tidy up some comments.
...
llvm-svn: 68112
2009-03-31 16:48:35 +00:00
Dan Gohman
0837aa99ea
Add a comment.
...
llvm-svn: 68111
2009-03-31 16:46:45 +00:00
Rafael Espindola
9277379fc0
remove unused arguments.
...
llvm-svn: 68109
2009-03-31 16:16:57 +00:00
Bill Wendling
6afae239c2
Really temporarily revert r68073.
...
llvm-svn: 68100
2009-03-31 08:42:40 +00:00
Bill Wendling
b8017e02ca
Oy! When reverting r68073, I added in experimental code. Sorry...
...
llvm-svn: 68099
2009-03-31 08:41:31 +00:00
Owen Anderson
4486c1fac0
Remove the "fast" cases for spill and restore point determination, as these were subtlely wrong in obscure cases. Patch the testcase
...
to account for this change.
llvm-svn: 68093
2009-03-31 08:27:09 +00:00
Bill Wendling
c4b08e5eb0
Revert r68073. It's causing a failure in the Apple-style builds.
...
llvm-svn: 68092
2009-03-31 08:26:26 +00:00
Chris Lattner
42bae59678
shrink subclassid, liberating some bits for future (ab)use.
...
llvm-svn: 68087
2009-03-31 07:25:22 +00:00
Dan Gohman
97a20b8dbf
Fix live-out reg logic to not insert over-aggressive AssertZExt
...
instructions. This fixes lua.
llvm-svn: 68083
2009-03-31 01:38:29 +00:00
Evan Cheng
885bc6de52
X86 address mode isel tweak. If the base of the address is also used by a CopyToReg (i.e. it's likely live-out), do not fold the sub-expressions into the addressing mode to avoid computing the address twice. The CopyToReg use will be isel'ed to a LEA, re-use it for address instead.
...
This is not yet enabled.
llvm-svn: 68082
2009-03-31 01:13:53 +00:00
Douglas Gregor
b874bd9f41
Really, really fix PointerUnion3::is
...
llvm-svn: 68079
2009-03-31 00:34:31 +00:00
Dan Gohman
adccd30533
Except in asm-verbose mode, avoid printing labels for blocks that are
...
only reachable via fall-through edges. This dramatically reduces the
number of labels printed, and thus also the number of labels the
assembler must parse and remember.
llvm-svn: 68073
2009-03-30 22:55:17 +00:00
Devang Patel
6e68bd007a
Loop Index Split can eliminate a loop if it can determin if loop body is executed only once. There was a bug in determining IV based value of the iteration for which the loop body is executed. Fix it.
...
llvm-svn: 68071
2009-03-30 22:24:10 +00:00
Douglas Gregor
d33a33cedb
Make PointerUnion3::get work properly
...
llvm-svn: 68067
2009-03-30 21:44:13 +00:00
Evan Cheng
a84a318873
When optimzing a mul by immediate into two, the resulting mul's should get a x86 specific node to avoid dag combiner from hacking on them further.
...
llvm-svn: 68066
2009-03-30 21:36:47 +00:00
Evan Cheng
09f5be8146
Turn a 2-address instruction into a 3-address one when it's profitable even if the two-address operand is killed.
...
e.g.
%reg1024<def> = MOV r1
%reg1025<def> = ADD %reg1024, %reg1026
r0 = MOV %reg1025
If it's not possible / profitable to commute ADD, then turning ADD into a LEA saves a copy.
llvm-svn: 68065
2009-03-30 21:34:07 +00:00
Chris Lattner
32f4959ee4
update comment.
...
llvm-svn: 68060
2009-03-30 20:44:04 +00:00
Bill Wendling
2f52e6488f
Balance out quote in debug output.
...
llvm-svn: 68059
2009-03-30 20:32:22 +00:00
Bill Wendling
5f0d97c571
Fix grammar-o in comment.
...
llvm-svn: 68057
2009-03-30 20:30:02 +00:00
Chris Lattner
8aa8f5bf6a
add a PointerUnion3 class and generalize PointerUnion to work with
...
anything pointer-like, which may or may not actually be a pointer.
llvm-svn: 68056
2009-03-30 20:29:27 +00:00
Chris Lattner
73acaa8862
fix the PointerLikeTypeTraits specialization for PointerIntPair to
...
allow the traits to be specified as well.
llvm-svn: 68055
2009-03-30 20:28:50 +00:00
Dan Gohman
ff62c62b7c
Constify arguments in isSuccessor and isLayoutSuccessor.
...
llvm-svn: 68054
2009-03-30 20:06:29 +00:00
Dan Gohman
d3899dc52f
Update the polygen grammer to reflect that zext and sext are no longer
...
valid argument attributes (zeroext and signext are).
llvm-svn: 68053
2009-03-30 19:59:02 +00:00
John Mosby
169927e7ef
docs/TestingGuide.html: correction to prev. text (objdir!=srcdir required for running test-suite), removed refs to llvm-test
...
llvm-svn: 68051
2009-03-30 18:56:53 +00:00
Bob Wilson
57178e8822
Fix comment to match function name.
...
llvm-svn: 68050
2009-03-30 18:49:37 +00:00
Devang Patel
7a78f3abd3
getEntryFor() may invalidate DenseMap iterator.
...
Walking an invalidated iterator is not a good idea.
llvm-svn: 68047
2009-03-30 18:34:47 +00:00
Mike Stump
9d98cc6b93
Add ccc back for now.
...
llvm-svn: 68038
2009-03-30 17:43:04 +00:00
Anton Korobeynikov
1a7432742c
Clearify local/global relocations wording
...
llvm-svn: 68037
2009-03-30 17:38:00 +00:00
Anton Korobeynikov
56709fdffe
Fix thinko: put stuff with both global and local relocations into data.rel{.ro}, not .local
...
llvm-svn: 68036
2009-03-30 17:37:43 +00:00
Anton Korobeynikov
71278a5be8
Tweak test for recent relro stuff
...
llvm-svn: 68035
2009-03-30 15:28:40 +00:00
Anton Korobeynikov
255a3cbfb4
Fix infinite looping
...
llvm-svn: 68034
2009-03-30 15:28:21 +00:00
Anton Korobeynikov
d5e8e93a92
Properly propagate Kind.
...
llvm-svn: 68033
2009-03-30 15:28:00 +00:00
Anton Korobeynikov
7c5f3c40ca
Do not propagate ELF-specific stuff (data.rel) into other targets. This simplifies code and also ensures correctness.
...
llvm-svn: 68032
2009-03-30 15:27:43 +00:00
Anton Korobeynikov
c247fd396c
Add data.rel stuff
...
llvm-svn: 68031
2009-03-30 15:27:03 +00:00
Chris Lattner
a01a563813
fix some validation problems.
...
llvm-svn: 68026
2009-03-30 06:34:59 +00:00
Evan Cheng
471ed6e460
Forgot this test.
...
llvm-svn: 68025
2009-03-30 06:17:34 +00:00
John Mosby
b92a76ff4f
Clarify section on setting up and running test-suite
...
llvm-svn: 68023
2009-03-30 04:37:51 +00:00
Misha Brukman
d326656d9c
Updated the comment for isArithmeticShift() to match reality.
...
llvm-svn: 68016
2009-03-29 20:41:38 +00:00
Bill Wendling
8fde3036bf
Constify check. This fixes PR3900.
...
llvm-svn: 68013
2009-03-29 20:08:56 +00:00
Anton Korobeynikov
f3cf04f900
Testcase for recent ro/relocs stuff
...
llvm-svn: 68008
2009-03-29 17:14:57 +00:00
Anton Korobeynikov
bea241a5f5
IA64 is as weird as Alpha wrt r/o relocs :)
...
llvm-svn: 68007
2009-03-29 17:14:35 +00:00
Anton Korobeynikov
014a86f216
Alpha always requires global relocations to be r/w regardless of PIC.
...
llvm-svn: 68006
2009-03-29 17:14:14 +00:00
Anton Korobeynikov
088ebede53
Honour relocation behaviour stuff for ro objects
...
llvm-svn: 68005
2009-03-29 17:13:49 +00:00
Anton Korobeynikov
7437b59caf
Extend the relocation tracker handler, so we can filter on different 'kinds' of relocations required.
...
llvm-svn: 68004
2009-03-29 17:13:18 +00:00
Duncan Sands
d21581eaa1
Fix PR3899: add support for extracting floats from vectors
...
when using -soft-float.
Based on a patch by Jakob Stoklund Olesen.
llvm-svn: 67996
2009-03-29 13:51:06 +00:00
Chris Lattner
6694cdf215
add missing space.
...
llvm-svn: 67995
2009-03-29 13:26:05 +00:00
Chris Lattner
5b52baeeef
add some comments, add a dyn_cast method.
...
llvm-svn: 67992
2009-03-29 07:03:30 +00:00
Chris Lattner
e50f47971b
When forming sentinels for empty/tombstone, make sure to respect the
...
pointer's expected number of zero low-bits.
This should fix the breakage I introduced recently.
llvm-svn: 67990
2009-03-29 06:33:22 +00:00
Chris Lattner
3a6dc751ac
add helper method.
...
llvm-svn: 67989
2009-03-29 06:32:46 +00:00
Chris Lattner
a9c6de15fb
Add a simple type-safe bit-mangling pointer union class. This allows
...
you to do things like:
/// PointerUnion<int*, float*> P;
/// P = (int*)0;
/// printf("%d %d", P.is<int*>(), P.is<float*>()); // prints "1 0"
/// X = P.get<int*>(); // ok.
/// Y = P.get<float*>(); // runtime assertion failure.
/// Z = P.get<double*>(); // does not compile.
/// P = (float*)0;
/// Y = P.get<float*>(); // ok.
/// X = P.get<int*>(); // runtime assertion failure.
llvm-svn: 67987
2009-03-29 06:06:02 +00:00
Chris Lattner
35c0232cb0
Allow a specific PointerIntPair instance to use a specific Pointer trait:
...
some pointer instances have properties that not all of a type have.
llvm-svn: 67986
2009-03-29 06:02:20 +00:00
Chris Lattner
d4ff5fce81
Add a PointerLikeTypeTraits specialization for uintptr_t
...
llvm-svn: 67985
2009-03-29 06:00:21 +00:00
Chris Lattner
9bb25a192a
Value* only has 2 bits free as well.
...
llvm-svn: 67984
2009-03-29 05:45:43 +00:00
Chris Lattner
eb71b17705
Replace the PointerLikeTypeTraits::getNumLowBitsAvailable
...
function with a new NumLowBitsAvailable enum, which makes the
value available as an integer constant expression.
Add PointerLikeTypeTraits specializations for Instruction* and
Use** since they are only guaranteed 4-byte aligned.
Enhance PointerIntPair to know about (and enforce) the alignment
specified by PointerLikeTypeTraits. This should allow things
like PointerIntPair<PointerIntPair<void*, 1,bool>, 1, bool>
because the inner one knows that 2 low bits are free.
llvm-svn: 67979
2009-03-29 04:32:37 +00:00
Chris Lattner
a00f0d7e4c
rename PointerLikeTypeInto to PointerLikeTypeTraits, add trait for
...
# low bits free, and move to its own header.
llvm-svn: 67973
2009-03-29 00:39:30 +00:00
Chris Lattner
8eda11bd9d
now that you can put a PointerIntPair in a SmallPtrSet, remove some
...
hackish workarounds from memdep
llvm-svn: 67971
2009-03-29 00:24:04 +00:00
Chris Lattner
dc2999b4df
teach SmallPtrSet that PointerIntPair is "basically a pointer".
...
llvm-svn: 67970
2009-03-29 00:18:42 +00:00
Chris Lattner
356d974a93
add a note
...
llvm-svn: 67953
2009-03-28 19:26:55 +00:00
Rafael Espindola
1f11c3c36f
Use array_lengthof
...
llvm-svn: 67950
2009-03-28 19:02:18 +00:00
Rafael Espindola
6ff3dabbb4
Have only one definition of X86AddrNumOperands.
...
llvm-svn: 67949
2009-03-28 18:55:31 +00:00
Rafael Espindola
c2a17d3022
Make code a bit less brittle by no hardcoding the number
...
of operands in an address in so many places.
llvm-svn: 67945
2009-03-28 17:03:24 +00:00
Arnold Schwaighofer
e622cbf385
Make check in CheckTailCallReturnConstraints for ignorable instructions between
...
a CALL and a RET node more generic. Add a test for tail calls with a void
return.
llvm-svn: 67943
2009-03-28 12:36:29 +00:00
Bill Wendling
c619aaf122
Update the Visual Studio docs. Patch by Stefanus!
...
llvm-svn: 67940
2009-03-28 10:24:15 +00:00
Arnold Schwaighofer
83d5420d02
Enable tail call optimization for functions that return a struct (bug 3664) and for functions that return types that need extending (e.g i1).
...
llvm-svn: 67934
2009-03-28 08:33:27 +00:00
Chris Lattner
0527eda02e
declare everything as class to avoid angering the VC++ gods.
...
llvm-svn: 67931
2009-03-28 07:48:03 +00:00
Chris Lattner
dec48eab86
add a traits class for SmallPtrSet that allows us to stick things that are
...
"basically pointers" into it.
llvm-svn: 67930
2009-03-28 07:44:53 +00:00
Evan Cheng
fd81c73cde
Optimize some 64-bit multiplication by constants into two lea's or one lea + shl since imulq is slow (latency 5). e.g.
...
x * 40
=>
shlq $3, %rdi
leaq (%rdi,%rdi,4), %rax
This has the added benefit of allowing more multiply to be folded into addressing mode. e.g.
a * 24 + b
=>
leaq (%rdi,%rdi,2), %rax
leaq (%rsi,%rax,8), %rax
llvm-svn: 67917
2009-03-28 05:57:29 +00:00
Chris Lattner
7516668998
move a large method out of line.
...
llvm-svn: 67892
2009-03-28 02:08:47 +00:00
Dan Gohman
2785e4be37
Fix what surely must be a copy+pasto.
...
llvm-svn: 67881
2009-03-27 23:55:04 +00:00
Dan Gohman
6d75876473
Initialize LiveOutInfo's APInt members to zero, as APInt's
...
default constructor produces an uninitialized APInt.
This fixes PR3896.
llvm-svn: 67879
2009-03-27 23:51:02 +00:00
Jim Grosbach
669f1d0b0b
remove trailing whitespace
...
llvm-svn: 67874
2009-03-27 23:06:27 +00:00
Gabor Greif
41c8515b1b
"ghostify" the ilist<Function> sentinel
...
llvm-svn: 67872
2009-03-27 22:28:33 +00:00
Mike Stump
ced6a2be04
Allow invertable -xno- style optins as well.
...
llvm-svn: 67862
2009-03-27 20:12:55 +00:00
Dan Gohman
8680802b1f
Revert r67844. This fixes the llvm-gcc-4.2 build on Darwin.
...
llvm-svn: 67856
2009-03-27 18:37:13 +00:00
Julien Lerouge
15833b93cf
Fix build on MacOS 10.4 systems (suggested by Mike Smith).
...
llvm-svn: 67855
2009-03-27 18:18:00 +00:00
Dan Gohman
3f50cb6cd4
Fix this test so that it doesn't spuriously fail due to some
...
unrelated debugging output happening to contain the string "store".
llvm-svn: 67849
2009-03-27 16:17:22 +00:00
Rafael Espindola
705f2a6cd2
Avoid hardcoding that X86 addresses have 4 operands.
...
llvm-svn: 67848
2009-03-27 15:57:50 +00:00
Rafael Espindola
227815437a
Use less hard coded constants to make the code less brittle.
...
llvm-svn: 67846
2009-03-27 15:45:05 +00:00
Duncan Sands
75d7e77a58
Reapply r66415, which was reverted in r66426 for
...
causing a bootstrap failure. Bootstraps here on
x86-32-linux and x86-64-linux. Requested by the
author Gabor Greif who says that a bug that might
have been causing the failure has since been fixed.
llvm-svn: 67844
2009-03-27 15:29:38 +00:00
Rafael Espindola
e728019392
I am trying to add a segment to the X86 addresses matching to
...
improve TLS support (see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090309/075220.html ), but that code is VERY brittle.
This patch just makes it a bit more resistant.
llvm-svn: 67843
2009-03-27 15:26:30 +00:00
Duncan Sands
3241b74f69
Revert r67798: it breaks llvm-gcc bootstrap on x86-64-linux, presumably due to
...
a miscompilation.
make[4]: Entering directory `gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include'
if [ ! -d "./x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch" ]; then \
mkdir -p ./x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch; \
fi; \
gcc-4.2.llvm-objects/./gcc/xgcc -shared-libgcc -Bgcc-4.2.llvm-objects/./gcc -nostdinc++
-Lgcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/src -Lgcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/include -isystem /usr/local/gnat-llvm/x86_64-unknown-linux-gnu/sys-include -Winvalid-pch -Wno-deprecated -x
c++-header -g -O2 -D_GNU_SOURCE -Igcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
-Igcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include -Igcc-4.2.llvm/libstdc++-v3/libsupc++ -O2 -g
gcc-4.2.llvm/libstdc++-v3/include/precompiled/stdtr1c++.h -o x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch
In file included from gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/repeat.h:247,
from gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/functional:1098,
from gcc-4.2.llvm/libstdc++-v3/include/precompiled/stdtr1c++.h:53:
gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/functional_iterate.h:417: internal compiler error: in ggc_recalculate_in_use_p, at
ggc-page.c:1602
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs/ > for instructions.
make[4]: *** [x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch] Error 1
llvm-svn: 67839
2009-03-27 14:56:47 +00:00
Mikhail Glushenkov
0f78c2721b
Documentation update.
...
Expand a bit on various '--*-graph' options.
llvm-svn: 67836
2009-03-27 12:58:29 +00:00
Mikhail Glushenkov
f4be420def
-write-graph now can be used with -o.
...
Makes it possible to set the output file name.
llvm-svn: 67835
2009-03-27 12:57:14 +00:00
Duncan Sands
99d0b2353e
Revert previous change in favour of an explanatory
...
comment.
llvm-svn: 67833
2009-03-27 11:35:00 +00:00
Duncan Sands
af7ae6ce3c
A Release-Asserts build makes it sound like assertions
...
are turned on, while in fact they are turned off. Name
this Release-NoAsserts instead.
llvm-svn: 67831
2009-03-27 09:41:56 +00:00
John Mosby
a1be2dcd63
Shrink wrapping in PEI: initial release. Finishing development, enable with --shrink-wrap.
...
llvm-svn: 67828
2009-03-27 06:09:40 +00:00
Evan Cheng
87a801af59
Add a __builtin___memset_chk test.
...
llvm-svn: 67815
2009-03-27 02:45:14 +00:00
Dale Johannesen
4026b041ce
One more place to skip debug info.
...
llvm-svn: 67811
2009-03-27 01:13:37 +00:00
Devang Patel
fe7c0492a0
While hoisting an instruction, update alias info set tracker.
...
llvm-svn: 67798
2009-03-26 23:48:52 +00:00
Mike Stump
a0c86128ed
Update to account for driver renaming.
...
llvm-svn: 67791
2009-03-26 23:43:14 +00:00
Evan Cheng
d88ebc352c
-no-implicit-float means explicit fp operations are legal.
...
llvm-svn: 67784
2009-03-26 23:06:32 +00:00
Evan Cheng
99c16729d3
Add -march=x86.
...
llvm-svn: 67783
2009-03-26 23:03:32 +00:00
Mikhail Glushenkov
87aa96ddf3
Fix misc. small issues with debug visualization.
...
Detailed bug report:
http://llvm.org/bugs/show_bug.cgi?id=3873
llvm-svn: 67768
2009-03-26 21:23:48 +00:00
Evan Cheng
904f14663d
tADDhirr is a thumb instruction. Do not allow this code to be reached in non-thumb mode.
...
llvm-svn: 67765
2009-03-26 19:09:01 +00:00
Owen Anderson
76a561f35e
Don't assign a new stack slot if the pre-alloc splitter already assigned one.
...
llvm-svn: 67764
2009-03-26 18:53:38 +00:00
Jim Grosbach
975c1cb41a
fix a few spelling errors and typos
...
llvm-svn: 67758
2009-03-26 16:17:51 +00:00
Jim Grosbach
4bae1ac5e8
Use 'bool' for FoundRC
...
llvm-svn: 67750
2009-03-26 14:45:34 +00:00
Bill Wendling
55a2cd736d
Add -f to RUN line.
...
llvm-svn: 67744
2009-03-26 06:17:54 +00:00
Bill Wendling
aa28be652c
Pull transform from target-dependent code into target-independent code.
...
llvm-svn: 67742
2009-03-26 06:14:09 +00:00
Chris Lattner
f661d328c4
no need for eh info
...
llvm-svn: 67740
2009-03-26 05:51:18 +00:00
Chris Lattner
78b7cbe668
fix warning in -asserts mode.
...
llvm-svn: 67739
2009-03-26 05:29:34 +00:00
Chris Lattner
f38fd11a26
fix some warnings in release-asserts mode.
...
llvm-svn: 67738
2009-03-26 05:28:26 +00:00
Chris Lattner
3c04970f31
fix an apparently real bug exposed by a warning in -asserts mode.
...
llvm-svn: 67737
2009-03-26 05:28:14 +00:00
Chris Lattner
3871781c7b
fix warning in -asserts build.
...
llvm-svn: 67736
2009-03-26 05:25:59 +00:00
Bill Wendling
996749e912
Add testcase for r67728.
...
llvm-svn: 67729
2009-03-26 01:52:47 +00:00
Bill Wendling
94f299f2c5
Match this pattern so that we can generate simpler code:
...
%a = ...
%b = and i32 %a, 2
%c = srl i32 %b, 1
%d = br i32 %c,
into
%a = ...
%b = and %a, 2
%c = X86ISD::CMP %b, 0
%d = X86ISD::BRCOND %c ...
This applies only when the AND constant value has one bit set and the SRL
constant is equal to the log2 of the AND constant. The back-end is smart enough
to convert the result into a TEST/JMP sequence.
llvm-svn: 67728
2009-03-26 01:47:50 +00:00
Bill Wendling
189d67181c
Doxygen-ify comments.
...
llvm-svn: 67727
2009-03-26 01:46:56 +00:00
Dale Johannesen
db90560c1c
Skip debug info one more place. (This one gets
...
called from llc, not opt, but it's an IR level
optimization nevertheless.)
llvm-svn: 67724
2009-03-26 01:15:07 +00:00
Devang Patel
4555618854
Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block.
...
llvm-svn: 67719
2009-03-25 23:57:48 +00:00
Jim Grosbach
292ea55130
Modify getRegisterValueType() to allow for a register being in mutliple
...
register classes. Before, MVT::Other would be returned anytime a reg was
in multiple register classes. Now, MVT::Other is only returned if the types
for those register classes differ.
llvm-svn: 67714
2009-03-25 23:28:33 +00:00
Evan Cheng
1e550e15cc
Add a test case for PR3779: when to promote the function return value.
...
llvm-svn: 67702
2009-03-25 20:30:19 +00:00
Evan Cheng
2e9f42bed5
Revert 67132. This is breaking some objective-c apps.
...
Also fixes SDISel so it *does not* force promote return value if the function is not marked signext / zeroext.
llvm-svn: 67701
2009-03-25 20:20:11 +00:00
Evan Cheng
1bb604aff5
One more test.
...
llvm-svn: 67694
2009-03-25 17:45:18 +00:00
Dale Johannesen
eb1646d28c
When optimizing with debug info, don't keep the
...
stoppoint nodes around until Legalize; doing this
imposed an ordering on a sequence of loads that
came from different lines, interfering with scheduling.
llvm-svn: 67692
2009-03-25 17:36:08 +00:00
Evan Cheng
4b6c049b3f
Add __builtin___memcpy_chk tests.
...
llvm-svn: 67691
2009-03-25 16:49:31 +00:00
Duncan Sands
39d0946db5
These tests pass on linux.
...
llvm-svn: 67689
2009-03-25 16:43:59 +00:00
Evan Cheng
b86a445d39
Add a __builtin_object_size test.
...
llvm-svn: 67688
2009-03-25 16:29:33 +00:00
Chris Lattner
56a95f6c16
Fix a bug in our autoupgrade support: in an argument list to a function
...
call, we should treat "i64 zext" as the start of a constant expr, but
"i64 0 zext" as an argument with an obsolete attribute on it (this form
is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll).
Make the autoupgrade logic more discerning to avoid treating "i64 zext"
as an old-style attribute, causing us to reject a valid constant expr.
This fixes PR3876.
llvm-svn: 67682
2009-03-25 06:36:36 +00:00
Gabor Greif
2755edf4c4
do not rely on callee being operand 0
...
llvm-svn: 67681
2009-03-25 06:32:59 +00:00
Devang Patel
68b0881d94
Do not ignore DW_TAG_class_type!
...
llvm-svn: 67675
2009-03-25 03:52:06 +00:00
Evan Cheng
499d5f333f
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
...
llvm-svn: 67669
2009-03-25 01:48:21 +00:00
Evan Cheng
5e5a63cf8f
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
...
llvm-svn: 67668
2009-03-25 01:47:28 +00:00
Evan Cheng
9966403e90
Don't print global names twice with -asm-verbose.
...
llvm-svn: 67667
2009-03-25 01:08:42 +00:00
Dan Gohman
7f570d5491
Revert r67655 and r67656, as they are breaking the build. I'm
...
not going to persue this further at this time.
llvm-svn: 67666
2009-03-25 00:52:11 +00:00
Chris Lattner
c3b2111d97
Fix PR3874 by restoring a condition I removed, but making it more
...
precise than it used to be.
llvm-svn: 67662
2009-03-25 00:28:58 +00:00
Devang Patel
a6e85a19c6
Do not ignore DW_TAG_class_type!
...
llvm-svn: 67661
2009-03-25 00:28:40 +00:00
Dan Gohman
1e7602a20e
LLVM's master Makefile.common is in LLVM_SRC_ROOT, not LLVM_OBJ_ROOT.
...
llvm-svn: 67658
2009-03-25 00:09:05 +00:00
Chris Lattner
9e94538005
oops, I intended to remove this, not comment it out. Thanks Duncan!
...
llvm-svn: 67657
2009-03-24 23:48:25 +00:00
Dan Gohman
9d4d283024
Regenerate configure.
...
llvm-svn: 67656
2009-03-24 23:47:11 +00:00
Dan Gohman
34be8be297
Fix paths; AutoRegen.sh changes its current working directory to be the
...
autoconf directory, but these paths need to be relative to the main
source directory.
llvm-svn: 67655
2009-03-24 23:46:25 +00:00
Dan Gohman
afcd6a3133
Update for autoconf 2.6x;
...
llvm-svn: 67654
2009-03-24 23:45:13 +00:00
Misha Brukman
d1d2c50ea7
Converted a1.ll to unittests.
...
llvm-svn: 67652
2009-03-24 21:36:09 +00:00
Duncan Sands
61837e6dc8
Mention explicitly that the Ada front-end will not bootstrap.
...
The configure line had --disable-bootstrap, but it was not
clear that this is essential.
llvm-svn: 67651
2009-03-24 21:16:39 +00:00
Evan Cheng
f413a88839
Fix PR3845: Avoid stale MachineInstruction pointer reference.
...
llvm-svn: 67649
2009-03-24 20:33:17 +00:00
Dan Gohman
24e02b1043
Fix bash-isms.
...
llvm-svn: 67647
2009-03-24 20:21:37 +00:00
Gabor Greif
e7e5becdd2
simplify logic and get rid of the assumption that operand 0 is the callee
...
llvm-svn: 67642
2009-03-24 19:28:39 +00:00
Chris Lattner
306813cbbb
canonicalize inttoptr and ptrtoint instructions which cast pointers
...
to/from integer types that are not intptr_t to convert to intptr_t
then do an integer conversion to the dest type. This exposes the
cast to the optimizer.
llvm-svn: 67638
2009-03-24 18:35:40 +00:00
Dale Johannesen
4d7e4ee799
fix one more fp80 case (used only by Interpreter)
...
and streamline code here a bit.
llvm-svn: 67636
2009-03-24 18:16:17 +00:00
Chris Lattner
d9eb41177a
two changes:
...
1. Make instcombine always canonicalize trunc x to i1 into an icmp(x&1). This
exposes the AND to other instcombine xforms and is more of what the code
generator expects.
2. Rewrite the remaining trunc pattern match to use 'match', which
simplifies it a lot.
llvm-svn: 67635
2009-03-24 18:15:30 +00:00
Dale Johannesen
f259f3f312
Change JIT for different layout of fp80.
...
llvm-svn: 67629
2009-03-24 17:35:45 +00:00
Dan Gohman
9fc30d5c30
Add a testcase for the scheduling heuristic introduced in r67586.
...
llvm-svn: 67622
2009-03-24 16:38:27 +00:00
Chris Lattner
c35847e109
more tidying: name the components of PhysReg in the case when
...
the target constraint specifies a specific physreg.
llvm-svn: 67618
2009-03-24 15:27:37 +00:00
Chris Lattner
42eceb3491
Tidy a bit more.
...
llvm-svn: 67617
2009-03-24 15:25:07 +00:00
Chris Lattner
246eda43bd
simplify this code a bit now that "allocation to a vreg class" can never
...
fail.
llvm-svn: 67616
2009-03-24 15:22:11 +00:00
Dan Gohman
efd2d44aa5
I was convinced that it's ok to allow a second i8 return value
...
to be returned in DL. LLVM's multiple-return-value support is
not ABI-conforming; front-ends that wish to have code emitted
that conforms to an ABI are currently expected to make
arrangements for this on their own rather than assuming that
multiple-return-values will automatically do the right thing.
This commit doesn't fundamentally change this situation.
llvm-svn: 67588
2009-03-24 01:04:34 +00:00
Dan Gohman
f3746cbc56
Minor compile-time optimization; don't bother checking
...
canClobberPhysRegDefs if the successor node doesn't
clobber any physical registers.
llvm-svn: 67587
2009-03-24 00:50:07 +00:00
Dan Gohman
9a658d72db
Add a pre-pass to the burr-list scheduler which makes adjustments to
...
help out the register pressure reduction heuristics in the case of
nodes with multiple uses. Currently this uses very conservative
heuristics, so it doesn't have a broad impact, but in cases where it
does help it can make a big difference.
llvm-svn: 67586
2009-03-24 00:49:12 +00:00
Evan Cheng
a774a99245
Do not emit comments unless -asm-verbose.
...
llvm-svn: 67580
2009-03-24 00:17:40 +00:00
Dale Johannesen
32dfb35281
Use a SmallPtrSet instead of std::set.
...
llvm-svn: 67578
2009-03-23 23:39:20 +00:00
Evan Cheng
7fe1b0f50f
Fix a bug in spill weight computation. If the alias is a super-register, and the super-register is in the register class we are trying to allocate. Then add the weight to all sub-registers of the super-register even if they are not aliases.
...
e.g. allocating for GR32, bh is not used, updating bl spill weight.
bl should get the same spill weight otherwise it will be choosen
as a spill candidate since spilling bh doesn't make ebx available.
This fix PR2866.
llvm-svn: 67574
2009-03-23 22:57:19 +00:00
Ted Kremenek
c8e54db801
Add sanity check in Clang TableGen backend to check if 'Component' is a string.
...
llvm-svn: 67565
2009-03-23 21:54:33 +00:00
Dale Johannesen
93eefa0043
Fix internal representation of fp80 to be the
...
same as a normal i80 {low64, high16} rather
than its own {high64, low16}. A depressing number
of places know about this; I think I got them all.
Bitcode readers and writers convert back to the old
form to avoid breaking compatibility.
llvm-svn: 67562
2009-03-23 21:16:53 +00:00
John Mosby
2441a7df96
README.txt: test commit w/blank line appended
...
llvm-svn: 67560
2009-03-23 21:00:45 +00:00
Dan Gohman
ed0e8d44ce
When unfolding a load during scheduling, the new operator node has
...
a data dependency on the load node, so it really needs a
data-dependence edge to the load node, even if the load previously
existed.
And add a few comments.
llvm-svn: 67554
2009-03-23 20:20:43 +00:00
Evan Cheng
4dc0c6697f
Update test for pr3864.
...
llvm-svn: 67545
2009-03-23 18:27:36 +00:00
Evan Cheng
f858466018
Fix PR3391 and PR3864. Reg allocator infinite looping.
...
llvm-svn: 67544
2009-03-23 18:24:37 +00:00
Dan Gohman
f477262e69
Don't set SUnit::hasPhysRegDefs to true unless the defs are
...
actually have uses, which reflects the way it's used.
llvm-svn: 67540
2009-03-23 17:39:36 +00:00
Dan Gohman
a366da1bf7
Fix canClobberPhysRegDefs to check all SDNodes grouped together
...
in an SUnit, instead of just the first one. This fix is needed
by some upcoming scheduler changes.
llvm-svn: 67531
2009-03-23 16:23:01 +00:00
Dan Gohman
52c278e54d
Add a new bit to SUnit to record whether a node has implicit physreg
...
defs, regardless of whether they are actually used.
llvm-svn: 67528
2009-03-23 16:10:52 +00:00
Dan Gohman
4f2fea1a21
Now that errs() is properly non-buffered, there's no need to
...
explicitly flush it.
llvm-svn: 67526
2009-03-23 15:57:19 +00:00
Dan Gohman
7135a9d166
Clarify a comment.
...
llvm-svn: 67525
2009-03-23 15:54:02 +00:00
Dan Gohman
21ff35195e
LoopVR is not CFGOnly.
...
llvm-svn: 67524
2009-03-23 15:50:52 +00:00
Dan Gohman
5aabc424b1
Enhance LiveValues to work on PHI operands.
...
llvm-svn: 67523
2009-03-23 15:49:37 +00:00
Dan Gohman
87cd443ae9
Make getOperandNumForIncomingValue and getOperandNumForIncomingBlock
...
static member functions, and add getIncomingValueNumForOperand
and getIncomingBlockNumForOperand, which are the respective
inverses.
llvm-svn: 67522
2009-03-23 15:48:29 +00:00
Dan Gohman
4a683478d5
Correct some comments. Operand numbers start at 0.
...
llvm-svn: 67518
2009-03-23 15:40:10 +00:00
Evan Cheng
968c3b0d6e
Model inline asm constraint which ties an input to an output register as machine operand TIED_TO constraint. This eliminated the need to pre-allocate registers for these. This also allows register allocator can eliminate the unneeded copies.
...
llvm-svn: 67512
2009-03-23 08:01:15 +00:00
Evan Cheng
47c9750f04
Do not fold away subreg_to_reg if the source register has a sub-register index. That means the source register is taking a sub-register of a larger register. e.g. On x86
...
%RAX<def> = ...
%RAX<def> = SUBREG_TO_REG 0, %EAX:3<kill>, 3
The first def is defining RAX, not EAX so the top bits were not zero-extended.
llvm-svn: 67511
2009-03-23 07:19:58 +00:00
Chris Lattner
f2b60658ef
fix a bug Alexei Svitkine pointed out.
...
llvm-svn: 67510
2009-03-23 06:46:20 +00:00
Chris Lattner
fb95472123
When we restore signal handlers, restore them back to what they
...
were when we came around, not to their default handler. This
should fix PR3848
llvm-svn: 67509
2009-03-23 05:55:36 +00:00
Chris Lattner
f299a68ee0
factorize signal registration, part of PR3848.
...
llvm-svn: 67508
2009-03-23 05:42:29 +00:00
Dan Gohman
772de0ae2d
Fix a grammaro in a comment that Bill noticed.
...
llvm-svn: 67507
2009-03-23 05:02:44 +00:00
Chris Lattner
57be315d36
tt'ify.
...
llvm-svn: 67505
2009-03-23 04:53:34 +00:00
Chris Lattner
30bc972596
VC++ 6.0 is not future work :)
...
Do not recommend llvm::OStream anymore. Use raw_ostream or MemoryBuffer.
llvm-svn: 67504
2009-03-23 04:52:53 +00:00
Dan Gohman
70d9929def
Add comments explaining why there's only one register for
...
i8 return values.
llvm-svn: 67502
2009-03-23 04:28:24 +00:00
Evan Cheng
3138f7a781
Missed this as part of r67451.
...
llvm-svn: 67500
2009-03-23 03:45:56 +00:00
Chris Lattner
b6ff0f3a4d
Fix PR3860 by correcting a predicate.
...
llvm-svn: 67473
2009-03-22 19:22:53 +00:00
Duncan Sands
b1656c1e1f
Add some explanations of how apint loads and stores
...
work.
llvm-svn: 67471
2009-03-22 11:33:16 +00:00
Bill Wendling
a443ab4bcd
Really should pass -dylib to the linker...
...
llvm-svn: 67469
2009-03-22 08:56:15 +00:00
Bill Wendling
f3ef2c758f
A dylib should be built as a dylib and not a bundle.
...
llvm-svn: 67468
2009-03-22 08:28:45 +00:00
Chris Lattner
adda37fb62
add method to access a template argument.
...
llvm-svn: 67458
2009-03-22 00:18:18 +00:00
Duncan Sands
1f15ca7c7a
Factorize out a concept - no functionality change.
...
llvm-svn: 67454
2009-03-21 21:27:31 +00:00
Evan Cheng
15f1754eb4
Re-commit r67334 and r67349 with fix.
...
llvm-svn: 67451
2009-03-21 18:12:24 +00:00
Chris Lattner
cbeda87da1
add a fastpath to ConstantExpr::getBitCast to handle the case when an obviously
...
unneeded bitcast is requested. This is common for frontends who just unconditionally
cast even if the target is often the right type already. THis prevents going into
getFoldedCast which switches on the opcode and does a bunch of other stuff before
doing the same opzn.
llvm-svn: 67435
2009-03-21 06:55:54 +00:00
Chris Lattner
9b62dff5f6
add some inline methods for infix operators on sparse vectors,
...
tidy some df iteration stuff, patch by John Mosby!
llvm-svn: 67428
2009-03-21 05:40:09 +00:00
Bruno Cardoso Lopes
9b9586a5ae
Removed AFGR32 register class
...
Handle odd registers allocation in FGR32.
llvm-svn: 67422
2009-03-21 00:05:07 +00:00
Bob Wilson
dc40d5ae2c
Fix a few more indentation problems and an 80-column violation.
...
llvm-svn: 67416
2009-03-20 23:16:43 +00:00
Bob Wilson
7117a916f5
No functional changes. Fix indentation and whitespace only.
...
llvm-svn: 67412
2009-03-20 22:42:55 +00:00
Chris Lattner
0a981d1d36
Fix instcombine to not introduce undefined shifts when merging two
...
shifts together. This fixes PR3851.
llvm-svn: 67411
2009-03-20 22:41:15 +00:00
Duncan Sands
a09e0afe74
Don't load values out of global constants with weak
...
linkage: the value may be replaced with something
different at link time. (Frontends that want to
allow values to be loaded out of weak constants can
give their constants weak_odr linkage).
llvm-svn: 67407
2009-03-20 21:53:29 +00:00
Dan Gohman
3bdc4bdba6
Simplify this code; use a while instead of an if and a do-while.
...
llvm-svn: 67400
2009-03-20 20:42:23 +00:00
Evan Cheng
2e55923fba
For inline asm output operand that matches an input. Encode the input operand index in the high bits.
...
llvm-svn: 67387
2009-03-20 18:03:34 +00:00
Sanjiv Gupta
4655d731e1
Fixed comment for libcalls.
...
llvm-svn: 67373
2009-03-20 14:10:20 +00:00
Sanjiv Gupta
83debdf4b4
Fixed build warnings for unused variables.
...
llvm-svn: 67372
2009-03-20 13:49:20 +00:00
Sanjiv Gupta
c035b7e879
Reformatting. Inserted code comments. Cleaned interfaces.
...
Removed unncessary code. No functionality change.
llvm-svn: 67371
2009-03-20 13:42:20 +00:00
Sanjiv Gupta
e9759c458c
Fixed the comment. No functionality change.
...
llvm-svn: 67370
2009-03-20 09:38:50 +00:00
Nick Lewycky
18ca80cdda
Revert r67334 and r37349 which break "make check" on Linux.
...
llvm-svn: 67368
2009-03-20 07:56:31 +00:00
Chris Lattner
f0db9b6321
Apply the patch requested in PR3846.
...
llvm-svn: 67364
2009-03-20 05:08:24 +00:00
Mon P Wang
f67448adf8
Added option to enable generating less precise mad (multiply addition)
...
for those architectures that support the instruction.
llvm-svn: 67363
2009-03-20 05:06:58 +00:00
Dan Gohman
76402b9a3d
The last use in a block that doesn't have successors
...
(return or unreachable) is a kill.
llvm-svn: 67357
2009-03-20 01:28:21 +00:00
Evan Cheng
6d6647c7b3
Fix typo's.
...
llvm-svn: 67349
2009-03-20 00:14:09 +00:00
Sebastian Redl
8d5baa09f8
Fix the Win32 VS2008 build:
...
- Make type declarations match the struct/class keyword of the definition.
- Move AddSignalHandler into the namespace where it belongs.
- Correctly call functions from template base.
- Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.
llvm-svn: 67347
2009-03-19 23:26:52 +00:00
Evan Cheng
1361cbbb0b
Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.
...
llvm-svn: 67335
2009-03-19 20:30:06 +00:00
Evan Cheng
05799db963
More makefile changes to allow dejagnu tests to pass when system tools default to a different target from the llvm configuration (e.g. 64-bit gcc and 32-bit llvm).
...
llvm-svn: 67334
2009-03-19 20:27:23 +00:00
Misha Brukman
5182b758a0
Renamed unittest files to have a consistent {Tt}est suffix.
...
llvm-svn: 67326
2009-03-19 19:09:48 +00:00
Dan Gohman
1026a8001f
SADDO and UADDO are commutative.
...
llvm-svn: 67319
2009-03-19 18:53:45 +00:00
Dale Johannesen
2050968df9
Clear the cached cost when removing a function in
...
the inliner; prevents nondeterministic behavior
when the same address is reallocated.
Don't build call graph nodes for debug intrinsic calls;
they're useless, and there were typically a lot of them.
llvm-svn: 67311
2009-03-19 18:03:56 +00:00
Dan Gohman
37061eef5d
Add a liveness analysis pass for LLVM IR values. This computes
...
the set of blocks in which values are used, the set in which
values are live-through, and the set in which values are
killed. For the live-through and killed sets, conservative
approximations are used.
llvm-svn: 67309
2009-03-19 17:29:04 +00:00
Dale Johannesen
e4f361212b
Fix comment typo.
...
llvm-svn: 67307
2009-03-19 17:23:29 +00:00
Dale Johannesen
52bc2aac8a
This pass keeps a map of Instructions to Rank numbers,
...
and was deleting Instructions without clearing the
corresponding map entry. This led to nondeterministic
behavior if the same address got allocated to another
Instruction within a short time.
llvm-svn: 67306
2009-03-19 17:22:53 +00:00
Ted Kremenek
dd03b5bb63
Fix regression in 'tblgen -gen-clang-diags-defs': Emit the diagnostic kind instead of "DIAGNOSTICCONTROLLED".
...
llvm-svn: 67305
2009-03-19 17:18:09 +00:00
Chris Lattner
58bd3dccf9
Fix PEI to not walk off the start of a block when an updated instruction
...
is the first in its block. This is PR3842.
llvm-svn: 67304
2009-03-19 17:15:43 +00:00
Duncan Sands
8208465036
Fix comment typo.
...
llvm-svn: 67302
2009-03-19 11:37:15 +00:00
Nick Lewycky
063699af70
Fix a couple glaring whitespace issues. This file isn't internally consistent
...
either.
llvm-svn: 67288
2009-03-19 06:31:22 +00:00
Nick Lewycky
bfd4ad67c7
Remove strange extra semicolons.
...
llvm-svn: 67287
2009-03-19 05:51:39 +00:00
Nate Begeman
dbe3f77f5b
Add support to tablegen for naming the nodes themselves, not just the operands,
...
in selectiondag patterns. This is required for the upcoming shuffle_vector rewrite,
and as it turns out, cleans up a hack in the Alpha instruction info.
llvm-svn: 67286
2009-03-19 05:21:56 +00:00
Bruno Cardoso Lopes
3b7b301a24
Added support for Mips O32 Calling Convention
...
llvm-svn: 67280
2009-03-19 02:12:28 +00:00
Ted Kremenek
4724b8262f
tblgen -gen-clang-diags-options: Output OptionTable entries in lexicographic
...
order.
llvm-svn: 67244
2009-03-18 21:36:46 +00:00
Ted Kremenek
bf76c6d971
'tblgen -gen-clang-diags-options' now outputs the OptionTable:
...
static const WarningOption OptionTable[] = {
{"unused-macros", DIAGS(UnusedMacrosDiags)}
...
};
This table is not yet properly sorted.
llvm-svn: 67242
2009-03-18 21:28:47 +00:00
Ted Kremenek
4a330b7ec1
Add another Clang TableGen-backend (-gen-clang-diags-options) for emitting
...
declarations for controlling groups of warnings. Currently this transforms:
def UnusedMacrosDiags : Option<"unused-macros", [pp_macro_not_used]>;
into:
static const diag::kind UnusedMacrosDiags[] = { diag::pp_macro_not_used };
llvm-svn: 67239
2009-03-18 21:16:16 +00:00
Chris Lattner
0f6dc78cfe
include the null at the end of a memorybuffer as part of the buffer.
...
This allows tblgen to handle include "foo.td" when the quote is exactly
the last character in a file. rdar://6695728
llvm-svn: 67232
2009-03-18 20:36:45 +00:00
Bill Wendling
7b06cbe6d4
These tests are now passing on Darwin because of r67139.
...
llvm-svn: 67215
2009-03-18 17:45:11 +00:00
Chris Lattner
514fc5b143
aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka Duncan)
...
for pointing this out :)
llvm-svn: 67212
2009-03-18 16:48:45 +00:00
Chris Lattner
595923ff75
Fix PR3826 - InstComb assert with vector shift, by not calling ComputeNumSignBits on a vector.
...
llvm-svn: 67211
2009-03-18 16:32:19 +00:00
Chris Lattner
ab8022055a
add an assertion to make it clear that PHI nodes are not allowed.
...
llvm-svn: 67210
2009-03-18 16:23:56 +00:00
Zhou Sheng
4e2af3cb55
Explicitly check for StoreInst, do not lose the chance to delete
...
unused loads or bitcasts.
llvm-svn: 67202
2009-03-18 12:48:48 +00:00
Zhou Sheng
05bea906c1
Revert my previous change on Local.cpp, instead, fix the bug on scalarrepl.
...
If the instruction has no users, it is also not only used by debug info
and should not be deleted.
llvm-svn: 67194
2009-03-18 10:13:08 +00:00
Rafael Espindola
d2b64fc65b
Add -relocation-model=pic so that the test works
...
both in Linux and Darwin.
llvm-svn: 67191
2009-03-18 09:38:28 +00:00
Zhou Sheng
64a6a092b1
Fix a bug.
...
If I->use_empty(), this method should return false.
llvm-svn: 67180
2009-03-18 07:56:13 +00:00
Mon P Wang
32c8074be6
Added missing support for widening when splitting an unary op (PR3683)
...
and expanding a bit convert (PR3711). In both cases, we extract the
valid part of the widen vector and then do the conversion.
llvm-svn: 67175
2009-03-18 06:24:04 +00:00
Evan Cheng
8df898917f
Add another test case for r64440.
...
llvm-svn: 67156
2009-03-18 02:43:01 +00:00
Evan Cheng
110377c669
xfail these tests for now.
...
llvm-svn: 67143
2009-03-18 00:44:45 +00:00
Chris Lattner
a6bed3e950
Disable the "call to immediate" optimization on x86-64. It is
...
not safe in general because the immediate could be an arbitrary
value that does not fit in a 32-bit pcrel displacement.
Conservatively fall back to loading the value into a register
and calling through it.
We still do the optzn on X86-32.
llvm-svn: 67142
2009-03-18 00:43:52 +00:00
Chris Lattner
a15ce21135
Fix PR3807 by inserting 'insertelement' instructions in the normal dest of
...
an invoke instead of after the invoke (in its block), which is invalid.
llvm-svn: 67139
2009-03-18 00:31:45 +00:00
Bill Wendling
4eaeb4ef22
A more proper -mtriple.
...
llvm-svn: 67138
2009-03-18 00:19:44 +00:00
Bill Wendling
3aad86fa3f
Temporary fix. I think Rafael wanted this to be Linux-only.
...
llvm-svn: 67137
2009-03-18 00:16:36 +00:00
Chris Lattner
42e9ca42ce
LSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right now
...
it is not APInt clean, but even when it is it needs to be evaluated carefully
to determine whether it is actually profitable.
This fixes a crash on PR3806
llvm-svn: 67134
2009-03-17 23:58:30 +00:00
Rafael Espindola
4606b12108
Don't force promotion of return arguments on the callee.
...
Some architectures (like x86) don't require it.
This fixes bug 3779.
llvm-svn: 67132
2009-03-17 23:43:59 +00:00
Daniel Dunbar
437b8a5ccc
Add BUILTIN_EXPECT Support/Compiler macro.
...
- Use for exceptional buffer conditions in raw_ostream:write to shave
off a cycle or two.
- Please rename if you have a better one.
llvm-svn: 67103
2009-03-17 21:15:18 +00:00
Chris Lattner
4359f3f26f
this is apparently passing now. Evan/Dan, please check
...
to see if this is producing the expected code or not, I'm
not sure what the test was intended to check.
llvm-svn: 67099
2009-03-17 20:23:43 +00:00
Devang Patel
62c72c6826
test case for rev. 67095.
...
llvm-svn: 67096
2009-03-17 19:47:21 +00:00
Chris Lattner
2363d0b8b9
Fix codegen to compute the size of an allocation by multiplying the
...
size by the array amount as an i32 value instead of promoting from
i32 to i64 then doing the multiply. Not doing this broke wrap-around
assumptions that the optimizers (validly) made. The ultimate real
fix for this is to introduce i64 version of alloca and remove mallocinst.
This fixes PR3829
llvm-svn: 67093
2009-03-17 19:36:00 +00:00
Chris Lattner
e549493a55
Remove a condition which is always true.
...
llvm-svn: 67089
2009-03-17 17:55:15 +00:00