Commit Graph

18626 Commits

Author SHA1 Message Date
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