Commit Graph

18729 Commits

Author SHA1 Message Date
Jeff Cohen
930c0fead9 Fix MemoryBuffer breakage correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36561 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 14:43:31 +00:00
Jeff Cohen
9bc406019e Unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36559 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 14:21:44 +00:00
Chris Lattner
c453f76e2b Switch the bitcode reader interface to take a MemoryBuffer instead of knowing
anything about disk I/O itself.  This greatly simplifies its interface -
eliminating the need for the ReaderWrappers.cpp file.

This adds a new option to llvm-dis (-bitcode) which instructs it to read
the input file as bitcode.  Until/unless the bytecode reader is taught to
read from MemoryBuffer, there is no way to handle stdin reading without it.

I don't plan to switch the bytecode reader over, I'd rather delete it :),
so the option will stay around temporarily.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36554 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 07:54:31 +00:00
Chris Lattner
333ffd4abf Add a new memorybuffer class, to unify all the file reading code in the system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36553 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 06:58:52 +00:00
Chris Lattner
01b27458a1 Fix this to use the right block ID
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36550 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 05:49:09 +00:00
Chris Lattner
1a9df8eee0 moved Writer.cpp -> BitcodeWriter.cpp to make it more unique in the tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36549 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 05:31:57 +00:00
Chris Lattner
09e4b7e1b7 memory operands that have a direct operand should have their stores created
before the copies into physregs are done.  This avoids having flag operands
skip the store, causing cycles in the dag at sched time.  This fixes infinite
loops on these tests:

test/CodeGen/Generic/2007-04-08-MultipleFrameIndices.ll for PR1308
test/CodeGen/PowerPC/2007-01-29-lbrx-asm.ll
test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll
test/CodeGen/X86/2006-07-12-InlineAsmQConstraint.ll for PR828


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36547 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 21:12:06 +00:00
Chris Lattner
c83994e5d4 eliminate more redundant constraint type analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36546 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 21:03:16 +00:00
Chris Lattner
2a600be226 merge constraint type analysis stuff together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36545 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 21:01:43 +00:00
Chris Lattner
0c58340aea Significant refactoring of the inline asm stuff, to support future changes.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 20:49:53 +00:00
Reid Spencer
9c9b63a5b8 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36543 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 16:07:31 +00:00
Reid Spencer
863dd88cc5 Revert the premature portion of the last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36542 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 16:06:50 +00:00
Anton Korobeynikov
7dde0ff0ba This is not "FIXME" anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36541 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 14:57:59 +00:00
Anton Korobeynikov
0f53f7f240 Let Verifier check aliasees
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 14:35:41 +00:00
Reid Spencer
3cb4ddaec0 Fix a compilation error (jump to case label).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36539 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 14:13:42 +00:00
Anton Korobeynikov
38e09802f6 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36538 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 13:48:45 +00:00
Anton Korobeynikov
a80e1181b7 Implement review feedback. Aliasees can be either GlobalValue's or
bitcasts of them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 13:45:00 +00:00
Chris Lattner
44b2c5098f memory inputs to an inline asm are required to have an address available.
If the operand is not already an indirect operand, spill it to a constant
pool entry or a stack slot.

This fixes PR1356 and CodeGen/X86/2007-04-27-InlineAsm-IntMemInput.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36536 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 06:42:38 +00:00
Chris Lattner
f2f3cd5129 Fix CodeGen/Generic/2007-04-27-LargeMemObject.ll and
CodeGen/Generic/2007-04-27-InlineAsm-X-Dest.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36534 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 06:08:13 +00:00
Chris Lattner
bb58b9c3c0 add a way to make this less brittle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36528 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 05:38:52 +00:00
Chris Lattner
7f3c4d49df fix a bug triggered by 403.gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36527 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 05:27:36 +00:00
Chris Lattner
e62f021c8c Fix several latent bugs in EmitGEPOffset that didn't manifest with its
previous clients.  This fixes MallocBench/gs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36525 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 04:52:43 +00:00
Chris Lattner
b017318122 Fix this to match change to InlineAsm class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36524 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 04:05:59 +00:00
Chris Lattner
53c22fc7c6 uhn zap cvs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36523 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 03:50:56 +00:00
Chris Lattner
73d0d0d4b8 represent indirect operands explicitly in inline asm strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36522 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 01:02:58 +00:00
Chris Lattner
9bc1464094 Implement PR1345 and Transforms/InstCombine/bitcast-gep.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36521 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 00:57:34 +00:00
Dale Johannesen
caa8055cf5 change per review
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36519 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 00:36:37 +00:00
Dale Johannesen
25c1f9e125 Prevent Thumb code from generating ARM instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36518 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 22:17:18 +00:00
Chris Lattner
6b0974cd1d add a GEP helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36515 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 20:35:56 +00:00
Lauro Ramos Venancio
4c6d20a096 add parenthesis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36514 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 20:10:08 +00:00
Evan Cheng
185ea1e2aa Doh. ARM::LEApcrel is a single instruction MI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36513 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 18:27:13 +00:00
Lauro Ramos Venancio
fdc9692f97 In Thumb mode, the frame register must be R7.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36512 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 17:58:03 +00:00
Chris Lattner
d3e28347e5 refactor some code relating to pointer cast xforms, pulling it out of the codepath
for unrelated casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36511 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 17:44:50 +00:00
Chris Lattner
eb7f34f2cb Fix incorrect legalization of EHSELECTOR. This fixes
CodeGen/Generic/2007-04-14-EHSelectorCrash.ll and PR1326


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36510 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 17:12:52 +00:00
Lauro Ramos Venancio
64f4fa5e0e ARM TLS: implement "general dynamic", "initial exec" and "local exec" models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36506 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 13:54:47 +00:00
Evan Cheng
b1df8f2750 Darwin runtime library does not have these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36505 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 08:15:43 +00:00
Evan Cheng
768c9f725b Special handling of LEApcrel and tLEApcrel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 08:14:15 +00:00
Evan Cheng
eec041a037 Back out previous check-in. Incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 07:50:02 +00:00
Evan Cheng
33fdc983fd tLEApcrel is a AddrModeTs, i.e. pc relative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36502 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 07:37:22 +00:00
Evan Cheng
4c6cfad85e Expand UINT_TO_FP in turns of SINT_TO_FP when UINTTOFP_* libcalls are not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36501 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 07:33:31 +00:00
Chris Lattner
99f9a77c49 improve EH global handling, patch by Duncan Sands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36499 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 01:20:11 +00:00
Devang Patel
6e21ff0b0a Move ~Pass() from Pass.h into Pass.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36498 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 21:33:42 +00:00
Chris Lattner
64c0f84c72 enable Anton's shift/and switch lowering stuff! It now passes ppc bootstrap
successfully! woohoo...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36496 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 21:09:43 +00:00
Dan Gohman
2a3250cd23 Fix PR1339 and CodeGen/X86/dollar-name.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36495 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 21:07:05 +00:00
Bill Wendling
bff35d11f1 Have MMX registers clobbered in x86-64 too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36494 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 21:06:48 +00:00
Anton Korobeynikov
ab8fd40403 Fixx off-by-one bug, which prevents llvm-gcc bootstrap on ppc32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36490 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 20:44:04 +00:00
Dan Gohman
edc1d15984 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36485 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 19:40:56 +00:00
Evan Cheng
faa510726f Rename findRegisterUseOperand to findRegisterUseOperandIdx to avoid confusion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36483 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 19:00:32 +00:00
Reid Spencer
6bc6333a10 1. Don't swap byte order in scanf. It isn't necessary and leads to
incorrect results (canonicalization was dropped several commits ago).
2. Add support for fscanf.
3. Suppress a warning about cast to pointer from non-pointer-sized integer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36482 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 18:19:35 +00:00
Devang Patel
dfa1ec3bc2 Use toplevel function pass manager as OnTheFly manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36481 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 17:50:19 +00:00
Zhou Sheng
c125c00e68 Using APInt more efficiently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36475 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 16:42:07 +00:00
Evan Cheng
8e29b2192b Minor bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 08:24:22 +00:00
Chris Lattner
b9d0c2a6a0 start code for writing out instructions. Separate BB#s from normal value
#'s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36472 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 05:53:54 +00:00
Chris Lattner
6cdc68200f regen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36470 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 05:31:05 +00:00
Chris Lattner
4989b84271 wrap long lines
Fix PR1358 and test/Assembler/2007-04-25-AssemblerFoldExternWeak.ll, by
creating forward decl globals with linkage extern_weak to defeat implicit
constant folding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36469 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 05:30:35 +00:00
Chris Lattner
c59c0afd7d enumerate BB's separately from other function values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36467 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 04:42:16 +00:00
Chris Lattner
8d35c79f27 add support for incorporating and purging functions to the value enumerator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36465 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 03:50:57 +00:00
Chris Lattner
51d5f29c3f improve a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36464 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 03:32:43 +00:00
Chris Lattner
198f34ac35 move some code around, fix a bug in the reader reading globalinits (which
I just introduced), stub out function reading, purge aggregate values from
the value table before reading functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36463 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 03:27:58 +00:00
Chris Lattner
07d98b4afb add bitcode alias support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36461 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 02:46:40 +00:00
Chris Lattner
69dacfce54 print aliases before functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36459 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 02:24:10 +00:00
Evan Cheng
05350288a6 Be careful when to add implicit kill / dead operands. Don't add them during / post reg-allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36458 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 01:40:09 +00:00
Evan Cheng
a24ddddf68 Fix for PR1348. If stack inc / dec amount is > 32-bits, issue a series of add / sub instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36456 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 01:09:28 +00:00
Bill Wendling
9de1371fc9 Quiet a compiler warning about assignment in an if-then conditional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36454 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 23:52:02 +00:00
Evan Cheng
6c087e5585 Match MachineFunction::UsedPhysRegs changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36452 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 22:13:27 +00:00
Evan Cheng
505e5510a2 Change UsedPhysRegs from array bool to BitVector to save some space. Setting / getting its states now go through MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36451 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 22:10:09 +00:00
Evan Cheng
ade31f9f07 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36449 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 21:34:08 +00:00
Bill Wendling
3f3a17dd62 Add SSSE3 as a feature of Core2. Add MMX registers to the list of registers
clobbered by a call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36448 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 21:31:48 +00:00
Evan Cheng
e96f50142e Data structure change to improve compile time (especially in debug mode).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36447 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 19:34:00 +00:00
Evan Cheng
c1a3520580 This was lefted out. Fixed sumarray-dbl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36445 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 18:33:21 +00:00
Devang Patel
68c01b3cf3 Mem2Reg does not need TargetData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36444 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 18:32:35 +00:00
Anton Korobeynikov
c0fabcbabe Add missed semicolon. Resotre compatibility with older bisons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36443 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 18:07:40 +00:00
Chris Lattner
7c6eefa5f1 do the multiplication as signed, so that 2*-2 == -4 instead of 4294967292
when promoted to 64-bits


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36442 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 17:23:53 +00:00
Devang Patel
41968df51e Remove unused function argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36441 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 17:15:20 +00:00
Lauro Ramos Venancio
305b8a5f62 remember to emit weak reference in one more case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36438 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 14:50:40 +00:00
Anton Korobeynikov
77d0f970b3 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36437 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 14:29:12 +00:00
Anton Korobeynikov
8b0a8c84da Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36435 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 14:27:10 +00:00
Evan Cheng
24a3cc4c83 Fix for PR1306.
- A register def / use now implicitly affects sub-register liveness but does
not affect liveness information of super-registers.
- Def of a larger register (if followed by a use later) is treated as
read/mod/write of a smaller register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36434 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 07:30:23 +00:00
Evan Cheng
92efbfcd2d Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36431 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 07:18:20 +00:00
Evan Cheng
1e341729dd Relex assertions to account for additional implicit def / use operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36430 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 07:12:14 +00:00
Chris Lattner
79b3bd395d If an alloca only has two types of uses: 1) reads 2) a memcpy/memmove that
copies from a constant global, then we can change the reads to read from the
global instead of from the alloca.  This eliminates the alloca and the memcpy,
and promotes secondary optimizations (because the loads are now loads from
a constant global).

This is important for a common C idiom:

void foo() {
   int A[] = {1,2,3,4,5,6,7,8,9...};
   ... only reads of A ...
}

For some reason, people forget to mark the array static or const.

This triggers on these multisource benchmarks:
JM/ldecode: block_pos, [3 x [4 x [4 x i32]]]
FreeBench/mason: m, [18 x i32], inlined 4 times
MiBench/office-stringsearch: search_strings, [1332 x i8*]
MiBench/office-stringsearch: find_strings, [1333 x i8*]
Prolangs-C++/city: dirs, [9 x i8*], inlined 4 places

and these spec benchmarks:
177.mesa: message, [8 x [32 x i8]]
186.crafty: bias_rl45, [64 x i32]
186.crafty: diag_sq, [64 x i32]
186.crafty: empty, [9 x i8]
186.crafty: xlate, [15 x i8]
186.crafty: status, [13 x i8]
186.crafty: bdinfo, [25 x i8]
445.gobmk: routines, [16 x i8*]
458.sjeng: piece_rep, [14 x i8*]
458.sjeng: t, [13 x i32], inlined 4 places.
464.h264ref: block8x8_idx, [3 x [4 x [4 x i32]]]
464.h264ref: block_pos, [3 x [4 x [4 x i32]]]
464.h264ref: j_off_tab, [12 x i32]

This implements Transforms/ScalarRepl/memcpy-from-global.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36429 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 06:40:51 +00:00
Chris Lattner
1a34b7bf9a simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36427 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 05:49:09 +00:00
Chris Lattner
a10b29b84b refactor the SROA code out into its own method, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36426 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 05:02:56 +00:00
Chris Lattner
ea84c5ee95 support for >4G stack frames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36425 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 04:30:24 +00:00
Chris Lattner
618078016d support >4G stack frames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 04:25:10 +00:00
Chris Lattner
a401b1e1c5 support > 4G stack objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36422 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 04:20:54 +00:00
Owen Anderson
ab0e4d38f0 Undo my previous changes. Since my approach to this problem is being revised,
this approach is no longer appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 04:18:54 +00:00
Chris Lattner
6266c18ea1 allow support for 64-bit stack objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36420 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 04:08:28 +00:00
Devang Patel
75abc1ed06 Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048376.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36417 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 00:37:04 +00:00
Chris Lattner
964dd86054 Be more careful about folding op(x, undef) when we have vector operands.
This fixes CodeGen/X86/2007-04-24-VectorCrash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36413 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-25 00:00:45 +00:00
Chris Lattner
6c2d260161 Fix PR1351 and CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 22:51:03 +00:00
Bill Wendling
a2c38ae90d Update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36407 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 21:20:03 +00:00
Bill Wendling
b53e98eb30 Add the PADDQ to the list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36406 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 21:19:14 +00:00
Bill Wendling
69dc5332de Add the final MMX instructions. Correct a few wrong patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36405 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 21:18:37 +00:00
Bill Wendling
6dd29e08f7 Remove some invalid instructions from this check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36404 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 21:17:46 +00:00
Bill Wendling
2f9bb1a0a4 Support for the special case of a vector with the canonical form:
vector_shuffle v1, v2, <2, 6, 3, 7>

I.e.

         vector_shuffle v, undef, <2, 2, 3, 3>

MMX only has a shuffle for v4i16 vectors. It needs to use the unpackh for
this type of operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36403 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 21:16:55 +00:00
Bill Wendling
95b3955034 Assertion when using a 1-element vector for an add operation. Get the
real vector type in this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36402 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 21:13:23 +00:00
Chris Lattner
f66d20da61 ensure that every error return sets a message (and goes through Error, for
easy breakpointing).

Fix bugs reading constantexpr geps.  We now can disassemble kc++ global
initializers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36398 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 18:15:21 +00:00
Chris Lattner
084a844d6d fix memory leak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36397 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 17:22:05 +00:00
Chris Lattner
4ab2d2009e fix a memory leak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36396 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 17:20:52 +00:00
Chris Lattner
f581c3b81e implement reading and writing of constant exprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36394 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 07:07:11 +00:00
Owen Anderson
3a2b58f3ad Rollback some changes that adversely affected performance. I'm currently rethinking
my approach to this, so hopefully I'll find a way to do this without making this slower.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36392 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 06:40:39 +00:00
Chris Lattner
522b7b104c implement support for reading aggregate constants, including handling forward
constant references, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36391 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 05:48:56 +00:00
Chris Lattner
0eef08046e add supprot for FP constants, wide integers, and fix the encoding of MININT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36390 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 04:04:35 +00:00
Chris Lattner
e16504eb4e read basic constants: null, undef, integers <= 64bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36389 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 03:30:34 +00:00
Chris Lattner
631a8ed3ff fix off-by-one computing size for section abbrevs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36388 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 03:29:47 +00:00
Scott Michel
f147a8d56e Use '-1U' where '-1UL' is obvious overkill, eliminating gcc warnings about
tests always being true in the process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36387 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 01:24:20 +00:00
Chris Lattner
e84bcb922d move check to the right place :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36386 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 00:21:45 +00:00
Chris Lattner
6dbfd7bfbc track global inits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36385 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 00:18:21 +00:00
Chris Lattner
2edd22b959 Emit module-level constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36384 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-24 00:16:04 +00:00
Dale Johannesen
00d56b96e5 modify per review commentary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36383 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 23:33:31 +00:00
Devang Patel
2a5fa18997 Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048333.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36380 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 22:42:03 +00:00
Chris Lattner
0b2482a1eb Read global symtab
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36378 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 21:26:05 +00:00
Chris Lattner
8c99a8e768 fix off-by one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36377 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 21:23:41 +00:00
Chris Lattner
b992be14bb write out the symtab for globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36374 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 20:35:01 +00:00
Dale Johannesen
56c42ef3e4 Make Thumb funcs containing islands 4-byte aligned. Fix bugs maintaining
BBOffsets and BBSizes when adjusting conditional branches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36372 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 20:09:04 +00:00
Dale Johannesen
bd24f3f398 add Align field, and use when generating function alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36371 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 20:07:25 +00:00
Dale Johannesen
24fb52da3c add isThumb (unused as yet)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36370 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 20:04:35 +00:00
Dale Johannesen
3bb6283eea Fix generic getInlineAsmLength
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36369 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 20:00:17 +00:00
Dale Johannesen
19f5469be4 make EmitAlignment work the way Chris says it should
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36368 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 19:58:54 +00:00
Chris Lattner
d127c1b5f3 implement reading of abbrevs, and writing of abbreviated global varrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36367 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 18:58:34 +00:00
Chris Lattner
36d5e7d31b first part of implementation of abbrevs. The writer isn't fully there yet and the
reader doesn't handle them at all yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36363 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 16:04:05 +00:00
Reid Spencer
2e40d03290 Cygwin doesn't have the RSS_LIMIT for get/setrlimit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36361 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 07:22:51 +00:00
Lauro Ramos Venancio
ede1d78969 X86 TLS: optimize the implementation of "local exec" model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36359 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 01:28:10 +00:00
Chris Lattner
47f96bf246 promote LLVMBitCodes to be a public header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36358 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 01:01:37 +00:00
Christopher Lamb
95c218a83e PR400 phase 2. Propagate attributed load/store information through DAGs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36356 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 23:15:30 +00:00
Lauro Ramos Venancio
7d2cc2b983 X86 TLS: fix and optimize the implementation of "initial exec" model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36355 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 22:50:52 +00:00
Christopher Lamb
032507d989 PR400 phase 1 implementation feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36354 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 22:22:02 +00:00
Jeff Cohen
dc4cb35105 Have compiler enforce this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36353 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 22:16:55 +00:00
Christopher Lamb
a7f0d3ce22 Support alignment queries for degenerate (length 1) vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36352 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 21:54:13 +00:00
Christopher Lamb
5c10424842 Regenerated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36350 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 20:09:11 +00:00
Christopher Lamb
43c7f37942 PR400 work phase 1. Add attributed load/store instructions for volatile/align to LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36349 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 19:24:39 +00:00
Jeff Cohen
cb403d69fb Fix build problem with Gentoo 4.1.1-r3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36348 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 18:49:32 +00:00
Reid Spencer
b90909e405 For PR1136:
Add reference counting to ParamAttrsList and make use of it in Function,
CallInst and InvokeInst classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36346 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 17:28:03 +00:00
Chris Lattner
b9707d50f7 add llvm ir bitcode definition file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36337 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 07:03:00 +00:00
Chris Lattner
6742b4df5c build the bitcode dir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36332 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:26:05 +00:00
Chris Lattner
fd57cecd2c Initial support for writing bitcode files. This currently only writes types,
the type symtab, and global/function protos, and is missing the important
size optimization, but it is a place to start.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36331 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:24:45 +00:00
Chris Lattner
caee0dccff Initial support for reading bitcode files. They currently only read types,
the type symtab, and global/function protos, and are missing the important
size optimization, but it is a place to start.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36330 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:23:29 +00:00
Reid Spencer
4f859aa532 For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36327 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 05:46:44 +00:00
Lauro Ramos Venancio
0ae4a3357a Implement PIC for arm-linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36324 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 00:04:12 +00:00
Lauro Ramos Venancio
2c5c111b6c X86 TLS: Implement review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36318 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 20:56:26 +00:00
Reid Spencer
c67bdc288a Revert Christopher Lamb's load/store alignment changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36309 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 18:36:27 +00:00
Reid Spencer
b3b0727032 We only need one putchar which gives it a shot at getting matched by its
users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36305 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 17:11:45 +00:00
Christopher Lamb
2330e4d4c4 add support for alignment attributes on load/store instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36301 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 08:16:25 +00:00
Owen Anderson
1b7f584fd8 Make PredicateSimplifier not use DominatorTree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 07:38:12 +00:00
Owen Anderson
cdacc498e4 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36299 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 07:12:44 +00:00
Devang Patel
3831c553e3 Reset vertex.
Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/048092.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36294 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 00:36:45 +00:00
Chris Lattner
d1458f1d30 Fix a bug that prevented the JIT from working correctly after llvm_shutdown.
Pass info objects are initialized by static ctors, so deleting them at
llvm_shutdown time prevents resurrection from working.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36292 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 00:12:18 +00:00
Chris Lattner
cd070759c4 Fix regressions introduced by my previous patch: opt calls verifier in a
way that the "Mod" ivar was not getting set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36291 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-20 23:59:29 +00:00
Lauro Ramos Venancio
0d3b67809c Allow the lowering of ISD::GLOBAL_OFFSET_TABLE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36290 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-20 23:02:39 +00:00