Anton Korobeynikov [Mon, 1 Jun 2009 19:03:17 +0000 (19:03 +0000)]
Do not emit "generic" CPU string. This fixes PR4291.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72696
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 1 Jun 2009 09:14:32 +0000 (09:14 +0000)]
PR4286: Make RewriteLoadUserOfWholeAlloca and
RewriteStoreUserOfWholeAlloca deal with tail padding because
isSafeUseOfBitCastedAllocation expects them to. Otherwise, we crash
trying to erase the bitcast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72688
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 1 Jun 2009 04:42:10 +0000 (04:42 +0000)]
Update the bitcode reader to support reading .bc files where the embedded
metadata references non-Constant values such as instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72685
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 1 Jun 2009 04:41:03 +0000 (04:41 +0000)]
Add missing codenames to the .bc analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72684
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 31 May 2009 17:52:18 +0000 (17:52 +0000)]
Fix a grammaro and clarify a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72668
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 31 May 2009 16:18:57 +0000 (16:18 +0000)]
Delete an obsolete sentance from a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72667
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 31 May 2009 16:18:03 +0000 (16:18 +0000)]
Fix the name of the function in this comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72666
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sun, 31 May 2009 09:03:40 +0000 (09:03 +0000)]
Be more aggressive in doing LoadPRE by tracing backwards when a block only has
a single predecessor.
Patch by Jakub Staszak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72661
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 31 May 2009 06:07:28 +0000 (06:07 +0000)]
Fix typo in error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72659
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 31 May 2009 04:15:38 +0000 (04:15 +0000)]
Rename CustomLowerResults to CustomLowerNode, since
it is used both when a result is illegal and when an
operand is illegal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72658
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 30 May 2009 23:50:33 +0000 (23:50 +0000)]
Use uint8_t and int32_t in {JIT,Machine}CodeEmiters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72650
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 30 May 2009 21:05:47 +0000 (21:05 +0000)]
Add AMD64 elf machine type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72635
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 30 May 2009 20:51:52 +0000 (20:51 +0000)]
First patch in the direction of splitting MachineCodeEmitter in two subclasses:
JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72631
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 30 May 2009 18:43:04 +0000 (18:43 +0000)]
fix PR4284, a bug in simplifylibcalls handling memcmp. Patch by
Benjamin Kramer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72625
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 30 May 2009 16:08:30 +0000 (16:08 +0000)]
Metadata uses metadata type not empty struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72623
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 30 May 2009 15:19:29 +0000 (15:19 +0000)]
Add some documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72622
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 30 May 2009 13:57:05 +0000 (13:57 +0000)]
Adjust these tests now that "extern inline"
functions are being output with bodies and
available_externally linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72620
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 30 May 2009 08:43:27 +0000 (08:43 +0000)]
(i64 (zext (srl GR32 8))) -> movzbl AH is not safe since srl 8 only clear the top 8 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72618
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 30 May 2009 05:06:04 +0000 (05:06 +0000)]
Give embedded metadata its own type instead of relying on EmptyStructTy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72610
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 30 May 2009 03:49:43 +0000 (03:49 +0000)]
Add support for letting the client choose different flavors of NaNs. Testcase to be
added in clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72606
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 30 May 2009 01:09:53 +0000 (01:09 +0000)]
Untabification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72604
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 30 May 2009 00:58:37 +0000 (00:58 +0000)]
Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72603
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 30 May 2009 00:48:34 +0000 (00:48 +0000)]
Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72600
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 29 May 2009 23:41:08 +0000 (23:41 +0000)]
Add placeholder for thumb2 stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72593
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 29 May 2009 20:38:16 +0000 (20:38 +0000)]
Enable GVN Load PRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72589
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 29 May 2009 19:39:36 +0000 (19:39 +0000)]
Dan noticed that the verifier wasn't thoroughly checking uses of
invoke results (see the testcases). Tighten up the checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72586
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 29 May 2009 17:08:57 +0000 (17:08 +0000)]
Fix some typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72579
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Fri, 29 May 2009 16:58:36 +0000 (16:58 +0000)]
just show the instruction, its not that slow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72577
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Fri, 29 May 2009 10:28:44 +0000 (10:28 +0000)]
for instructions with void type we have no choice but print the instruction as
is, otherwise we get a <badref>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72567
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Fri, 29 May 2009 09:46:03 +0000 (09:46 +0000)]
Add a DEBUG() output to GVN that prints the instruction clobbering a load.
This is useful when trying to figure out why GVN didn't eliminate redundant
loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72565
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 29 May 2009 05:37:54 +0000 (05:37 +0000)]
Fix an issue where phiMap was not being updated properly when doing load PRE.
Diagnosis and patch thanks to Jakub Staszak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72562
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 May 2009 05:31:40 +0000 (05:31 +0000)]
Default isNarrowingProfitable to false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72561
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 May 2009 05:28:52 +0000 (05:28 +0000)]
Remove an accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72560
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 29 May 2009 01:44:43 +0000 (01:44 +0000)]
More h-registers tricks: folding zext nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72558
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 May 2009 23:52:18 +0000 (23:52 +0000)]
Do not try to create a MVT type of width 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72557
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 May 2009 23:40:46 +0000 (23:40 +0000)]
The MONITOR and MWAIT instructions have insufficient information for
decoding. Essentially, they both map to the same column in the "opcode
extensions for one- and two-byte opcodes" table in the x86 manual. The RawFrm
complicates decoding this.
Instead, use opcode 0x01, prefix 0x01, and form MRM1r. Then have the code
emitter special case these, a la [SML]FENCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72556
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 28 May 2009 22:45:24 +0000 (22:45 +0000)]
NewNightlyTest.pl: Add a -parallel-jobs argument (set # of jobs for make with
-parallel, instead of always using 2).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72551
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 May 2009 21:04:35 +0000 (21:04 +0000)]
Add explicit test for PR4280.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72539
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 May 2009 20:40:34 +0000 (20:40 +0000)]
Re-commit r72514 and r72516 with a fixed version of BR_CC lowering.
This patch removes some special cases for opcodes and does a bit of
cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72536
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 May 2009 18:55:28 +0000 (18:55 +0000)]
Fix MOVMSKPDrr encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72535
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 May 2009 18:48:53 +0000 (18:48 +0000)]
Fix PSIGND encoding bug. Patch by Sean Callanan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72534
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 May 2009 18:41:02 +0000 (18:41 +0000)]
Incorporate patch feedbacks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72533
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 28 May 2009 18:31:40 +0000 (18:31 +0000)]
NightlyTest: Write "sentdata.txt" files and run the -submit-aux script before
sending data to the server.
- Otherwise if the server connection fails the external script never runs.
Also, create content before initiating connection to try and decrease time we
are connected to llvm.org.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72532
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 28 May 2009 18:24:11 +0000 (18:24 +0000)]
Emit debug info for locals with proper scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72531
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 May 2009 18:18:59 +0000 (18:18 +0000)]
Temporarily revert r72514 (and dependent patch r72516). It was causing this
failure during llvm-gcc bootstrap:
Assertion failed: (!Tmp2.getNode() && "Can't legalize BR_CC with legal condition!"), function ExpandNode, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 2923.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:1727: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72530
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 28 May 2009 17:32:56 +0000 (17:32 +0000)]
Mark the branch insns correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72529
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 28 May 2009 06:59:57 +0000 (06:59 +0000)]
Fixing problems that got exposed after the refactoring of LegalizeDAG done in 72447.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72521
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 May 2009 05:10:20 +0000 (05:10 +0000)]
Add a testcase which got fixed by recent legalization work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72517
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 May 2009 04:49:34 +0000 (04:49 +0000)]
Remove a couple of useless functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72516
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 May 2009 04:39:57 +0000 (04:39 +0000)]
Remove special cases for more opcodes.
This is basically the end of this series of patches for LegalizeDAG; the
remaining special cases can't be removed without more infrastructure
work. There's a FIXME for each relevant opcode near the beginning of
SelectionDAGLegalize::LegalizeOp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72514
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 May 2009 04:31:08 +0000 (04:31 +0000)]
Return the operand rather than a null SDValue when the given SELECT_CC
is actually legal. Part of LegalizeDAG cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72513
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 28 May 2009 04:08:10 +0000 (04:08 +0000)]
Use Operands.data() instead of &Operands[0] where Operands is a potentially
empty SmallVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72512
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 May 2009 03:56:57 +0000 (03:56 +0000)]
Remove special case for SETCC opcode; add some comments explaining why
some special cases are necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72511
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 28 May 2009 03:16:17 +0000 (03:16 +0000)]
This patch brings the list of attributes in CPPBackend.cpp up to date with the
list in Attributes.h. It also reorders the CPPBackend list to match so that
it's easier to see that it's complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72510
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 28 May 2009 03:06:16 +0000 (03:06 +0000)]
Some minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72509
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 May 2009 02:04:00 +0000 (02:04 +0000)]
"The instructions MMX_PSADBWrm and MMX_PSADBWrr have opcode
0b11100000 (e0), but
the Intel manual (screenshot) says it should be
0b11110110 (f6). The existing
encoding causes a disassembly conflict with MMX_PAVGBrm, which really should be
0f e0."
Patch by Sean Callanan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72508
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 May 2009 00:35:15 +0000 (00:35 +0000)]
Added optimization that narrow load / op / store and the 'op' is a bit twiddling instruction and its second operand is an immediate. If bits that are touched by 'op' can be done with a narrower instruction, reduce the width of the load and store as well. This happens a lot with bitfield manipulation code.
e.g.
orl $65536, 8(%rax)
=>
orb $1, 10(%rax)
Since narrowing is not always a win, e.g. i32 -> i16 is a loss on x86, dag combiner consults with the target before performing the optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72507
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 May 2009 21:10:47 +0000 (21:10 +0000)]
Revert 72493 and replace it with a more conservative fix, for now: don't
rewrite the comparison if there is any implicit extension or truncation
on the induction variable. I'm planning for IVUsers to eventually take
over some of the work of this code, and for it to be generalized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72496
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 20:39:00 +0000 (20:39 +0000)]
Ger rid of some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72494
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 May 2009 20:00:18 +0000 (20:00 +0000)]
In ChangeCompareStride, when the stride to be reused is truncated to
a smaller type, promoted its offset back up to the type of the new
comparison. This fixes PR4222.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72493
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 27 May 2009 18:38:01 +0000 (18:38 +0000)]
Fix sfence jit encoding. Patch by Sean Callanan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72488
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 27 May 2009 17:43:21 +0000 (17:43 +0000)]
This looks like it passes now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72485
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 27 May 2009 17:23:44 +0000 (17:23 +0000)]
Added support for fround, fextend and FP_TO_SINT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72483
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 27 May 2009 16:52:17 +0000 (16:52 +0000)]
Minor fix for CMake build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72480
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Wed, 27 May 2009 15:49:33 +0000 (15:49 +0000)]
CMake: Set LIBS on llvm-config so we can query the system libraries
used by CMake with --ldflags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72470
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 12:42:55 +0000 (12:42 +0000)]
Minor cleanups; add a better explanation for the issue with
BUILD_VECTOR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72469
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 12:20:41 +0000 (12:20 +0000)]
Remove more special cases for opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72468
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 07:58:35 +0000 (07:58 +0000)]
Remove special cases for more opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72467
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 07:32:27 +0000 (07:32 +0000)]
Removing more special cases from LegalizeDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72465
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 07:05:37 +0000 (07:05 +0000)]
Eliminate more special cases for opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72464
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 03:33:44 +0000 (03:33 +0000)]
Remove more special cases from LegalizeDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72456
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 02:21:29 +0000 (02:21 +0000)]
Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72455
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 02:16:40 +0000 (02:16 +0000)]
Remove more opcode special cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72454
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 May 2009 02:07:15 +0000 (02:07 +0000)]
Add braces around an array initializer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72453
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 May 2009 02:00:53 +0000 (02:00 +0000)]
Teach SCEVExpander to avoid creating over-indexed GEP indices when
possible. For example, it now emits
%p.2.ip.1 = getelementptr [3 x [3 x double]]* %p, i64 2, i64 %tmp, i64 1
instead of the equivalent but less obvious
%p.2.ip.1 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 %tmp, i64 19
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72452
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 May 2009 01:48:27 +0000 (01:48 +0000)]
Teach BasicAliasAnalysis to understand constant gep indices that fall
beyond their associated static array type.
I believe that this fixes a legitimate bug, because BasicAliasAnalysis
already has code to check for this condition that works for non-constant
indices, however it was missing the case of constant indices. With this
change, it checks for both.
This fixes PR4267, and miscompiles of SPEC 188.ammp and 464.h264.href.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72451
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 01:25:56 +0000 (01:25 +0000)]
Start of refactoring LegalizeDAG so that we don't need specialized
handling for every single opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72447
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 27 May 2009 00:47:34 +0000 (00:47 +0000)]
Don't abuse the quirky behavior of LegalizeDAG for XINT_TO_FP and
FP_TO_XINT. Necessary for some cleanups I'm working on. Updated
from the previous version (r72431) to fix a bug and make some things a
bit clearer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72445
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 26 May 2009 23:19:19 +0000 (23:19 +0000)]
Testcase for (llvm-gcc-4.2) 72442 (PR 4242).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72443
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 26 May 2009 21:27:02 +0000 (21:27 +0000)]
Back out r72431, it is causing a number of compilation crashes with clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72436
91177308-0d34-0410-b5e6-
96231b3b80d8
Stefanus Du Toit [Tue, 26 May 2009 21:04:35 +0000 (21:04 +0000)]
Update CPU capabilities for AMD machines
- added processors k8-sse3, opteron-sse3, athlon64-sse3, amdfam10, and
barcelona with appropriate sse3/4a levels
- added FeatureSSE4A for amdfam10 processors
in X86Subtarget:
- added hasSSE4A
- updated AutoDetectSubtargetFeatures to detect SSE4A
- updated GetCurrentX86CPU to detect family 15 with sse3 as k8-sse3 and
family 10h as amdfam10
New processor names match those used by gcc.
Patch by Paul Redmond!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72434
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 26 May 2009 19:18:56 +0000 (19:18 +0000)]
Don't abuse the quirky behavior of LegalizeDAG for XINT_TO_FP and
FP_TO_XINT. Necessary for some cleanups I'm working on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72431
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Tue, 26 May 2009 19:11:47 +0000 (19:11 +0000)]
For the new ar --plugin libLLVMgold.so to work we need libLTO linked with
pthreads, otherwise ar complains of unresolved references to pthread_mutex_*.
LTO doesn't actually use pthreads, but ManagedStatic does.
Fix this by linking in LIBS (that contains pthreads) for LTO and gold.
For now this links in more libs than needed (libffi for example), we can figure
out later how to link in those libs per-tool later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72430
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Tue, 26 May 2009 18:27:15 +0000 (18:27 +0000)]
LiveVariables::VarInfo contains an AliveBlocks BitVector, which has as many
entries as there are basic blocks in the function. LiveVariables::getVarInfo
creates a VarInfo struct for every register in the function, leading to
quadratic space use. This patch changes the BitVector to a SparseBitVector,
which doesn't help the worst-case memory use but does reduce the actual use in
very long functions with short-lived variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72426
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 May 2009 17:44:05 +0000 (17:44 +0000)]
For the return type of SCEVUDivExpr, use the RHS' type instead of
that of the LHS. It doesn't matter for correctness, but the LHS
is more likely than the RHS to be a pointer type in exotic cases,
and it's more tidy to have it return the integer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72424
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 May 2009 17:42:32 +0000 (17:42 +0000)]
Give SCEVNaryExpr a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72423
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 May 2009 17:41:16 +0000 (17:41 +0000)]
In cases where a pointer value is an operand of a multiplication or
division operation, don't attempt to use the operation's value as
the base of a getelementptr. This fixes PR4271.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72422
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 26 May 2009 08:55:52 +0000 (08:55 +0000)]
Delete a bunch of dead code from LegalizeDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72414
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 26 May 2009 06:25:46 +0000 (06:25 +0000)]
Eliminate VarInfo::UsedBlocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72411
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 May 2009 21:28:56 +0000 (21:28 +0000)]
make memdep use the getModRefInfo method for stores instead of the
low-level alias() method, allowing it to reason more aggressively
about pointers into constant memory. PR4189
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72403
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 25 May 2009 21:28:11 +0000 (21:28 +0000)]
Audit the type constructors. Previously it was possible to create [0 x void]
or use labels as members of structures for example. Also included a couple of
whitespace fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72402
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 May 2009 20:28:19 +0000 (20:28 +0000)]
add some late optimizations that GCC does. It thinks these are a win
even on Core2, not just AMD processors which was a surprise to me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72396
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 May 2009 19:51:07 +0000 (19:51 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72395
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 May 2009 16:34:44 +0000 (16:34 +0000)]
we should eventually add -march=atom and the new atom movbe instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72387
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 25 May 2009 06:29:56 +0000 (06:29 +0000)]
Fix the crash debugger to actually bisect globals once it's determined that it
can't just eliminate all global initializers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72378
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 25 May 2009 05:30:00 +0000 (05:30 +0000)]
Add a bisection step on the list of instructions before doing the linear
simplification. It's not clear to me whether this can replace the first of the
linear instruction simplification stages or not, so I left it in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72377
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 24 May 2009 23:45:28 +0000 (23:45 +0000)]
Various comment fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72376
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 24 May 2009 23:25:42 +0000 (23:25 +0000)]
Change ScalarEvolution::getSCEVAtScope to always return the original value
in the case where a loop exit value cannot be computed, instead of only in
some cases while using SCEVCouldNotCompute in others. This simplifies
getSCEVAtScope's callers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72375
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 24 May 2009 20:32:10 +0000 (20:32 +0000)]
Add a comment which should hopefully make the purpose of this method a
bit clearer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72374
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 24 May 2009 20:29:11 +0000 (20:29 +0000)]
Minor improvement to FCOPYSIGN to use BIT_CONVERT in cases where the
corresponding integer type is legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72373
91177308-0d34-0410-b5e6-
96231b3b80d8