Dan Gohman [Fri, 18 Dec 2009 03:57:04 +0000 (03:57 +0000)]
Revert this use of NSW; this one isn't actually safe. NSW addition
is not reassociative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91667
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 03:25:51 +0000 (03:25 +0000)]
Eliminte unnecessary uses of <cstdio>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91666
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 03:10:26 +0000 (03:10 +0000)]
Add utility routines for NSW multiply.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91664
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 02:58:50 +0000 (02:58 +0000)]
Add utility routines for creating integer negation operators with NSW set.
Integer negation only overflows with INT_MIN, but that's an important case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91662
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 02:14:37 +0000 (02:14 +0000)]
Delete an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91659
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 18 Dec 2009 02:12:53 +0000 (02:12 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91657
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 02:09:29 +0000 (02:09 +0000)]
Preserve NSW information in more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91656
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 18 Dec 2009 01:59:21 +0000 (01:59 +0000)]
Re-apply 91623 now that I actually know what I was trying to do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91655
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:24:09 +0000 (01:24 +0000)]
Add Loop contains utility methods for testing whether a loop
contains another loop, or an instruction. The loop form is
substantially more efficient on large loops than the typical
code it replaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91654
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:20:44 +0000 (01:20 +0000)]
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91653
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:14:11 +0000 (01:14 +0000)]
Whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91651
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:05:06 +0000 (01:05 +0000)]
Tidy up this testcase and add test for tailcall optimization
with unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91650
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 18 Dec 2009 01:03:29 +0000 (01:03 +0000)]
Handle ARM inline asm "w" constraints with 64-bit ("d") registers.
The change in SelectionDAGBuilder is needed to allow using bitcasts to convert
between f64 (the default type for ARM "d" registers) and 64-bit Neon vector
types. Radar
7457110.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91649
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:02:18 +0000 (01:02 +0000)]
Remove "tail" keywords. These calls are not intended to be tail calls.
This protects this test from depending on codegen not performing the
tail call optimization by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91648
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 00:38:08 +0000 (00:38 +0000)]
Don't pass const pointers by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91647
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 00:28:43 +0000 (00:28 +0000)]
Update a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91645
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 18 Dec 2009 00:27:18 +0000 (00:27 +0000)]
Pass the error string directly to llvm_unreachable instead of the residual
(0 && "error"). Rough consensus seems to be that g++ *should* be diagnosing
this because the pointer makes it not an ICE in c++03. Everyone agrees that
the current standard is silly and null-pointer-ness should not be based on
ICE-ness. Excellent fight scene in Act II, denouement weak, two stars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91644
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 18 Dec 2009 00:11:44 +0000 (00:11 +0000)]
Add test case for the phi reuse patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91642
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 00:06:20 +0000 (00:06 +0000)]
Reapply LoopStrengthReduce and IVUsers cleanups, excluding the part
of 91296 that caused trouble -- the Processed list needs to be
preserved for the livetime of the pass, as AddUsersIfInteresting
is called from other passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91641
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 00:03:58 +0000 (00:03 +0000)]
Add an svn:ignore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91639
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Fri, 18 Dec 2009 00:01:26 +0000 (00:01 +0000)]
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 17 Dec 2009 23:49:16 +0000 (23:49 +0000)]
Sundry dependent-name fixes flagged by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91636
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 17 Dec 2009 23:45:18 +0000 (23:45 +0000)]
Revert accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91635
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 17 Dec 2009 23:42:32 +0000 (23:42 +0000)]
Turn off critical edge splitting for landing pads. The introduction of a
non-landing pad basic block as the successor to a block that ends in an
unconditional jump will cause block folding to remove the added block as a
successor. Thus eventually removing it AND the landing pad entirely. Critical
edge splitting is an optimization, so we can safely turn it off when dealing
with landing pads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91634
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 17 Dec 2009 22:44:34 +0000 (22:44 +0000)]
Revert r91623 to unbreak the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91632
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 17 Dec 2009 22:42:29 +0000 (22:42 +0000)]
Allow instcombine to combine "sext(a) >u const" to "a >u trunc(const)".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91631
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 17 Dec 2009 21:35:29 +0000 (21:35 +0000)]
Don't codegen available_externally functions. Fixes llvm.org/PR5735.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91626
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 17 Dec 2009 21:27:47 +0000 (21:27 +0000)]
Make the ptrtoint comparison simplification work if one side is a global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91624
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Dec 2009 21:23:58 +0000 (21:23 +0000)]
Remove an unused option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91623
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Dec 2009 21:23:46 +0000 (21:23 +0000)]
tabs -> spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91622
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 17 Dec 2009 21:07:31 +0000 (21:07 +0000)]
Slightly generalize transformation of memmove(a,a,n) so that it also applies
to memcpy. (Such a memcpy is technically illegal, but in practice is safe
and is generated by struct self-assignment in C code.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91621
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 17 Dec 2009 21:02:39 +0000 (21:02 +0000)]
Make Path use StringRef instead of std::string where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91620
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 17 Dec 2009 20:41:01 +0000 (20:41 +0000)]
Temporarily revert 91337. It's causing testcase failures.
$ svn merge -c -91337 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91337 into '.':
U lib/CodeGen/AsmPrinter/DwarfException.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91618
91177308-0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 17 Dec 2009 20:39:34 +0000 (20:39 +0000)]
Fix Windows build breakage...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91617
91177308-0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Thu, 17 Dec 2009 20:09:43 +0000 (20:09 +0000)]
Introduce EVT::getHalfSizedIntegerVT() for use in ExpandUnalignedStore() in
LegalizeDAG.cpp. Unlike the code it replaces, which simply decrements the simple
type by one, getHalfSizedIntegerVT() searches for the smallest simple integer
type that is at least half the size of the type it is called on. This approach
has the advantage that it will continue working if a new value type (such as
i24) is added to MVT.
Also, in preparation for new value types, remove the assertions that
non-power-of-2 8-bit-mutiple types are Extended when legalizing extload and
truncstore operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91614
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Dec 2009 20:00:21 +0000 (20:00 +0000)]
finish cleaning up StructLayoutMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91612
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 17 Dec 2009 19:55:06 +0000 (19:55 +0000)]
This fixes a memory leak in OpaqueType found by Google's internal heapchecker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91611
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 17 Dec 2009 19:07:19 +0000 (19:07 +0000)]
Fix unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91609
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 17 Dec 2009 18:34:24 +0000 (18:34 +0000)]
Re-revert 91459. It's breaking the x86_64 darwin bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91607
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Dec 2009 18:03:12 +0000 (18:03 +0000)]
Remove debugging code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91604
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 17 Dec 2009 17:18:11 +0000 (17:18 +0000)]
Add more detail for getting started on Windows.
Patch from jon.forums at gmail.com
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91603
91177308-0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Thu, 17 Dec 2009 15:31:52 +0000 (15:31 +0000)]
In LowerEXTRACT_VECTOR_ELT, force an i32 value type for PEXTWR instead of
incrementing the simple value type of the 16-bit type, which would give the
wrong type if an intemediate MVT (such as i24) were introduced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91602
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Dec 2009 09:39:49 +0000 (09:39 +0000)]
Revert 91280-91283, 91286-91289, 91291, 91293, 91295-91296. It apparently introduced a non-deterministic behavior in the optimizer somewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91598
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 17 Dec 2009 07:49:26 +0000 (07:49 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91595
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 17 Dec 2009 07:49:16 +0000 (07:49 +0000)]
Add a 'set_option' action for use in OptionPreprocessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91594
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 17 Dec 2009 07:48:49 +0000 (07:48 +0000)]
Refactoring, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91593
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 17 Dec 2009 07:48:34 +0000 (07:48 +0000)]
s/TokenizeCmdline/TokenizeCmdLine/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91592
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 17 Dec 2009 06:35:17 +0000 (06:35 +0000)]
Update CMake build to include HexDisassembler.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91589
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 17 Dec 2009 06:07:04 +0000 (06:07 +0000)]
Aggressively flip compare constant expressions where appropriate; constant
folding in particular expects null to be on the RHS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91587
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 17 Dec 2009 05:07:36 +0000 (05:07 +0000)]
Fix a comment grammaro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91584
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 17 Dec 2009 05:05:36 +0000 (05:05 +0000)]
BIT_CONVERT nodes are used for vector types, too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91582
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Thu, 17 Dec 2009 01:49:59 +0000 (01:49 +0000)]
Test harness for the LLVM disassembler. When invoked
with -disassemble, llvm-mc now accepts lines of the
form
0x00 0x00
and passes the resulting bytes to the disassembler for
the chosen (or default) target, printing the result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91579
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Dec 2009 00:40:05 +0000 (00:40 +0000)]
Revert this dag combine change:
Fold (zext (and x, cst)) -> (and (zext x), cst)
DAG combiner likes to optimize expression in the other way so this would end up cause an infinite looping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91574
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 16 Dec 2009 23:36:52 +0000 (23:36 +0000)]
Renamed "tCMNZ" to "tCMNz" to be consistent with other similar namings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91571
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 16 Dec 2009 20:31:50 +0000 (20:31 +0000)]
Silence a clang warning about the deprecated (but perfectly reasonable in
context) increment-of-bool idiom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91564
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 16 Dec 2009 20:10:05 +0000 (20:10 +0000)]
Reapply r91392, it was only unmasking the bug, and since TOT is still broken having it reverted does no good.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91560
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 16 Dec 2009 20:09:53 +0000 (20:09 +0000)]
Reapply r91459, it was only unmasking the bug, and since TOT is still broken having it reverted does no good.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91559
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 16 Dec 2009 19:44:06 +0000 (19:44 +0000)]
Mark STREX* as earlyclobber for the success result register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91555
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 16 Dec 2009 19:43:02 +0000 (19:43 +0000)]
Add @earlyclobber TableGen constraint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91554
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 16 Dec 2009 19:36:42 +0000 (19:36 +0000)]
Remove superfluous 'extern' variable that was causing a warning with clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91552
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 16 Dec 2009 18:55:53 +0000 (18:55 +0000)]
Reuse lowered phi nodes.
Tail duplication produces lots of identical phi nodes in different basic
blocks. Teach PHIElimination to reuse the join registers when lowering a phi
node that is identical to an already lowered node. This saves virtual
registers, and more importantly it avoids creating copies the the coalescer
doesn't know how to eliminate.
Teach LiveIntervalAnalysis about the phi joins with multiple uses.
This patch significantly reduces code size produced by -pre-regalloc-taildup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91549
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 16 Dec 2009 11:38:03 +0000 (11:38 +0000)]
Fix one more missing this-> to placate that picky clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91536
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 16 Dec 2009 10:56:17 +0000 (10:56 +0000)]
Revert "Reapply 91184 with fixes and an addition to the testcase to cover the
problem", this broke llvm-gcc bootstrap for release builds on
x86_64-apple-darwin10.
This reverts commit
db22309800b224a9f5f51baf76071d7a93ce59c9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91534
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 16 Dec 2009 10:56:02 +0000 (10:56 +0000)]
Revert "Initial work on disabling the scheduler. This is a work in progress, and
this", this broke llvm-gcc bootstrap for release builds on
x86_64-apple-darwin10.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91533
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 09:32:05 +0000 (09:32 +0000)]
reapply my strstr optimization. I have reproduced the x86-64 bootstrap
miscompile (i386.o miscompares) but it happens both with and without
this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91532
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 09:17:12 +0000 (09:17 +0000)]
fix more missing this->'s to placate clang++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91531
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 09:09:54 +0000 (09:09 +0000)]
Fix a missing this-> that clang++ notices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91530
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 08:44:24 +0000 (08:44 +0000)]
now that libsystem no longer uses SmallVector, we can move
SmallVectorBase::grow_pod out of line, finally satisfying PR3758.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91529
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 08:40:44 +0000 (08:40 +0000)]
remove use of SmallVector from Path::makeUnique. Path::makeUnique
is not used by anything performance sensitive, so just use std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91528
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 08:35:54 +0000 (08:35 +0000)]
eliminate an extraneous use of SmallVector in a case where
a fixed size buffer is perfectly fine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91527
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 08:34:40 +0000 (08:34 +0000)]
factor out the grow() method for all pod implementations into one
common function. It is still an inline method, which will be fixed next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91526
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Wed, 16 Dec 2009 08:10:57 +0000 (08:10 +0000)]
Use different name for argument and field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91524
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 08:09:23 +0000 (08:09 +0000)]
pull destroy_range and uninitialized_copy up to the
SmallVectorTemplateBase class, which allows us to statically
dispatch on isPodLike instead of dynamically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91523
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 08:05:48 +0000 (08:05 +0000)]
sink most of the meat in smallvector back from SmallVectorTemplateCommon
down into SmallVectorImpl. This requires sprinking a ton of this->'s in,
but gives us a place to factor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91522
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 16 Dec 2009 07:35:25 +0000 (07:35 +0000)]
Make this test pass on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91521
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 06:55:45 +0000 (06:55 +0000)]
substantial refactoring of SmallVector, now most code is in SmallVectorTemplateCommon,
and there is a new SmallVectorTemplateBase class in between it and SmallVectorImpl.
SmallVectorTemplateBase can be specialized based on isPodLike.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91518
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Wed, 16 Dec 2009 02:52:09 +0000 (02:52 +0000)]
MDNodes that refer to an instruction are local to a function; in that case, explicitly keep track of the function they are local to
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91497
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 16 Dec 2009 02:32:54 +0000 (02:32 +0000)]
Add encoding bits for some Thumb instructions. Plus explicitly set the top two
bytes of Inst to 0x0000 for the benefit of the Thumb decoder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91496
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 16 Dec 2009 02:11:38 +0000 (02:11 +0000)]
XFAIL on ppc-darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91495
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 16 Dec 2009 00:53:11 +0000 (00:53 +0000)]
Re-enable 91381 with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91489
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Dec 2009 00:46:02 +0000 (00:46 +0000)]
revert my strstr optimization, I'm told it breaks x86-64 bootstrap.
Will reapply with a fix when I get a chance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91486
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 16 Dec 2009 00:29:41 +0000 (00:29 +0000)]
Do better with physical reg operands (typically, from inline asm)
in local register allocator. If a reg-reg copy has a phys reg
input and a virt reg output, and this is the last use of the phys
reg, assign the phys reg to the virt reg. If a reg-reg copy has
a phys reg output and we need to reload its spilled input, reload
it directly into the phys reg than passing it through another reg.
Following 76208, there is sometimes no dependency between the def of
a phys reg and its use; this creates a window where that phys reg
can be used for spilling (this is true in linear scan also). This
is bad and needs to be fixed a better way, although 76208 works too
well in practice to be reverted. However, there should normally be
no spilling within inline asm blocks. The patch here goes a long way
towards making this actually be true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91485
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 16 Dec 2009 00:15:28 +0000 (00:15 +0000)]
Every anonymous namespace is different. Caught by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91481
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 16 Dec 2009 00:13:24 +0000 (00:13 +0000)]
Explicit template instantiations must happen in the template's immediately
enclosing namespace. Caught by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91480
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 16 Dec 2009 00:08:36 +0000 (00:08 +0000)]
Helpful comment added. Some code cleanup. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91479
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 16 Dec 2009 00:01:27 +0000 (00:01 +0000)]
Initialize uninitialized variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91477
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 16 Dec 2009 00:00:18 +0000 (00:00 +0000)]
Initialize uninitialized variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91475
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Tue, 15 Dec 2009 22:42:46 +0000 (22:42 +0000)]
Change indirect-globals to use a dedicated allocIndirectGV. This lets us
remove start/finishGVStub and the BufferState helper class from the
MachineCodeEmitter interface. It has the side-effect of not setting the
indirect global writable and then executable on ARM, but that shouldn't be
necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91464
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 15 Dec 2009 22:42:19 +0000 (22:42 +0000)]
Some command lines don't like numbers with leading zeros. Remove them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91463
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 15 Dec 2009 22:00:51 +0000 (22:00 +0000)]
Reapply 91184 with fixes and an addition to the testcase to cover the problem
found last time. Instead of trying to modify the IR while iterating over it,
I've change it to keep a list of WeakVH references to dead instructions, and
then delete those instructions later. I also added some special case code to
detect and handle the situation when both operands of a memcpy intrinsic are
referencing the same alloca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91459
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 15 Dec 2009 22:00:37 +0000 (22:00 +0000)]
lit: Improve error when gtest discovery fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91458
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 15 Dec 2009 20:21:44 +0000 (20:21 +0000)]
Revert 90628, which was incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91448
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Dec 2009 19:34:20 +0000 (19:34 +0000)]
Fix GetConstantStringInfo to not look into MDString (it works on
real data, not metadata) and fix DbgInfoPrinter to not abuse
GetConstantStringInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91444
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 15 Dec 2009 19:28:13 +0000 (19:28 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91442
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 15 Dec 2009 19:16:48 +0000 (19:16 +0000)]
Add support to emit debug info for C++ namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91440
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Dec 2009 19:14:40 +0000 (19:14 +0000)]
optimize strstr, PR5783
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91438
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Tue, 15 Dec 2009 17:24:14 +0000 (17:24 +0000)]
Added encoding bits for the Thumb ISA. Initial checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91434
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 15 Dec 2009 16:30:09 +0000 (16:30 +0000)]
Delete an unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91432
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Dec 2009 09:05:13 +0000 (09:05 +0000)]
add some other xforms that should be done as part of PR5783
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91428
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Dec 2009 08:34:01 +0000 (08:34 +0000)]
a few improvements:
1. Use std::equal instead of reinventing it.
2. don't run dtors in destroy_range if element is pod-like.
3. Use isPodLike to decide between memcpy/uninitialized_copy
instead of is_class. isPodLike is more generous in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91427
91177308-0d34-0410-b5e6-
96231b3b80d8