Jakob Stoklund Olesen [Sat, 8 Aug 2009 20:42:17 +0000 (20:42 +0000)]
Don't build illegal ops in DAGCombiner::SimplifyBinOpWithSameOpcodeHands().
Blackfin supports and/or/xor on i32 but not on i16. Teach
DAGCombiner::SimplifyBinOpWithSameOpcodeHands to not produce illegal nodes
after legalize ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78497
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 8 Aug 2009 20:23:47 +0000 (20:23 +0000)]
give pic16 a target-specific section creation name too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78496
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 8 Aug 2009 20:22:20 +0000 (20:22 +0000)]
now that getOrCreateSection is all object-file specific,
give the impls an object-file-specific name. In the future
they can take different arguments etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78495
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 8 Aug 2009 20:14:13 +0000 (20:14 +0000)]
sink getOrCreateSection down into all the object file implementations,
now that they create *all* the sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78494
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 8 Aug 2009 20:09:33 +0000 (20:09 +0000)]
Fix some cut and paste-os.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78493
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 8 Aug 2009 20:02:57 +0000 (20:02 +0000)]
add a little function to do arbitrary string pattern matching in a
much more efficient way than a sequence of if's. Switch MatchRegisterName
to use it. It would be nice if someone could factor this out to a shared
place in tblgen :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78492
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 8 Aug 2009 19:16:05 +0000 (19:16 +0000)]
add another const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78487
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 8 Aug 2009 19:15:25 +0000 (19:15 +0000)]
remove a useless anon-ns, make table const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78486
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Aug 2009 18:59:03 +0000 (18:59 +0000)]
Some ProfileInfo cleanups.
- Part of optimal static profiling patch sequence by Andreas Neustifter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78485
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Aug 2009 18:44:18 +0000 (18:44 +0000)]
Add a basic static ProfileInfo provider (ProfileEstimatorPass).
- Part of optimal static profiling patch sequence by Andreas Neustifter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78484
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 8 Aug 2009 18:07:59 +0000 (18:07 +0000)]
Define intrinsics for crc instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78482
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 8 Aug 2009 17:47:41 +0000 (17:47 +0000)]
Use reloc_absolute_word_sext relocation for X86::MOV64(ri/mi)32 instructions,
since they are in 64 bit mode with i64immSExt32 imms. JIT is not affected since
it handles both word absolute relocations in the same way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78479
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Aug 2009 17:43:09 +0000 (17:43 +0000)]
More ProfileInfo improvements.
- Part of optimal static profiling patch sequence by Andreas Neustifter.
- Store edge, block, and function information separately for each functions
(instead of in one giant map).
- Return frequencies as double instead of int, and use a sentinel value for
missing information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78477
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 8 Aug 2009 17:29:04 +0000 (17:29 +0000)]
ELF improvements:
Handle large integers, x86_fp80, ConstantAggregateZero, and two more ConstantExpr:
GetElementPtr and IntToPtr
Set SHF_MERGE bit for mergeable strings
Avoid zero initialized strings to be classified as a bss symbol
Don't allow common symbols to be classified as STB_WEAK
Add a constant to be used as a global value offset in data relocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78476
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Aug 2009 17:03:13 +0000 (17:03 +0000)]
Update CMake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78475
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 8 Aug 2009 15:34:50 +0000 (15:34 +0000)]
Clean out per-function data after the machine code verifier is done with it.
Also don't dereference old pointers after they have been deleted causing
random crashes when enabling the machine code verifier.
Ahem...
I have not included a test case for the crash. It hapened when enabling the
verifier on CodeGen/X86/2009-08-06-branchfolder-crash.ll.
The crash depends on an MBB being allocated at the same address as a
previously deleted MBB. I don't think that can be reproduced reliably.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78472
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 8 Aug 2009 14:06:07 +0000 (14:06 +0000)]
Add insert_elt / extract_elt patterns for v4f32 stuff.
Did anyone tests v4f32 ever?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78470
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 8 Aug 2009 14:05:53 +0000 (14:05 +0000)]
Lane number should be printed w/o hash
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78469
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 8 Aug 2009 13:35:48 +0000 (13:35 +0000)]
Use VLDM / VSTM to spill/reload 128-bit Neon registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78468
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 8 Aug 2009 13:19:25 +0000 (13:19 +0000)]
Update the machine code verifier to keep up with the scavenger.
* Cleaner handling of <undef>.
* <def> takes precedence over <def,dead>.
* Implement the OK-to-redefine-a-register-that-was-
live-in-but-has-not-been-used-before rule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78467
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 8 Aug 2009 13:19:10 +0000 (13:19 +0000)]
Remove RegisterScavenger::isSuperRegUsed(). This completely reverses the mistaken commit r77904.
Now there is no special treatment of instructions that redefine part of a
super-register. Instead, the super-register is marked with <imp-use,kill> and
<imp-def>. For instance, from LowerSubregs on ARM:
subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1<undef>, %D1<kill>, 5
subreg: %D2<def> = FCPYD %D1<kill>, 14, %reg0, %Q1<imp-def>
subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1, %D0<kill>, 6
subreg: %D3<def> = FCPYD %D0<kill>, 14, %reg0, %Q1<imp-use,kill>, %Q1<imp-def>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78466
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 8 Aug 2009 13:18:47 +0000 (13:18 +0000)]
Simplify RegScavenger::forward a bit more.
Verify that early clobber registers and their aliases are not used.
All changes to RegsAvailable are now done as a transaction so the order of
operands makes no difference.
The included test case is from PR4686. It has behaviour that was dependent on the order of operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78465
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sat, 8 Aug 2009 12:49:07 +0000 (12:49 +0000)]
move this fp select into a pattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78464
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 8 Aug 2009 11:26:50 +0000 (11:26 +0000)]
Always initialize AsmConds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78463
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 8 Aug 2009 10:06:30 +0000 (10:06 +0000)]
MSVC doesn't like member variables with the same name as the class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78462
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Aug 2009 07:50:56 +0000 (07:50 +0000)]
llvm-mc/AsmMatcher: Improve match code.
- This doesn't actually improve the algorithm (its still linear), but the
generated (match) code is now fairly compact and table driven. Still need a
generic string matcher.
- The table still needs to be compressed, this is quite simple to do and should
shrink it to under 16k.
- This also simplifies and restructures the code to make the match classes more
explicit, in anticipation of resolving ambiguities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78461
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 8 Aug 2009 06:13:25 +0000 (06:13 +0000)]
Implement Neon VZIP and VUZP instructions. These are very similar to VTRN,
so I generalized the class for VTRN in the .td file to handle all 3 of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78460
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 8 Aug 2009 05:53:00 +0000 (05:53 +0000)]
Implement Neon VTRN instructions. For now, anyway, these are selected
directly from the intrinsics produced by the frontend. If it is more
convenient to have a custom DAG node for using these to implement shuffles,
we can add that later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78459
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Aug 2009 05:24:34 +0000 (05:24 +0000)]
llvm-mc/AsmMatcher: Switch to a unified function to convert operands to MCInst,
so that terminal states are as simple as possible.
- If we were willing to assume that the order that operands get inserted in the
MCInst is fixed we could actually dispose with this altogether, although it
might be nice to have the flexibility to change it later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78458
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 8 Aug 2009 03:21:23 +0000 (03:21 +0000)]
Add a skeleton Thumb2 instruction size reduction pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78456
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 8 Aug 2009 03:20:32 +0000 (03:20 +0000)]
Code refactoring. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78455
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 8 Aug 2009 03:19:44 +0000 (03:19 +0000)]
tADDhirr should target GPR, not tGPR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78454
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 8 Aug 2009 02:54:37 +0000 (02:54 +0000)]
I can type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78453
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 8 Aug 2009 01:32:19 +0000 (01:32 +0000)]
make printInstruction return void since its result is omitted. Make the
error condition get trapped with an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78449
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Aug 2009 00:40:46 +0000 (00:40 +0000)]
Fix some -Asserts unused variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78447
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Bolka [Sat, 8 Aug 2009 00:21:49 +0000 (00:21 +0000)]
Add another Strong-SIV testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 8 Aug 2009 00:05:42 +0000 (00:05 +0000)]
don't check the result of printInstruction anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78444
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 7 Aug 2009 23:59:21 +0000 (23:59 +0000)]
Do not generate 32-bit call on win64 when imm does not fit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78443
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 7 Aug 2009 23:57:30 +0000 (23:57 +0000)]
rename test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78441
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 7 Aug 2009 23:56:42 +0000 (23:56 +0000)]
merge a bunch of tests together into one, convert to filecheck which
is more tolerant of whitespace differences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78439
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 7 Aug 2009 23:53:05 +0000 (23:53 +0000)]
Add new intrinsics for Neon VTRN, VZIP and VUZP operations. Modeling these
as vector shuffles did not work out well. Shuffles that produce double-wide
vectors accurately represent the operation but make it hard to do anything
with the results. I considered splitting them up into 2 shuffles, one to
write each register separately, but there doesn't seem to be a good way to
reunite them for codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78437
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 23:48:59 +0000 (23:48 +0000)]
Add DEBUG_WITH_TYPE as a clean alternative to tweaking DEBUG_TYPE.
This:
--
#undef DEBUG_TYPE
#define DEBUG_TYPE "foo"
DEBUG(...)
#undef DEBUG_TYPE
#define DEBUG_TYPE ""
--
becomes this:
--
DEBUG_WITH_TYPE("foo", ...)
--
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78435
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 7 Aug 2009 23:45:02 +0000 (23:45 +0000)]
Convert more Neon tests to use FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78433
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 7 Aug 2009 23:42:01 +0000 (23:42 +0000)]
code cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78432
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 7 Aug 2009 23:37:47 +0000 (23:37 +0000)]
Unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78431
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Fri, 7 Aug 2009 23:32:33 +0000 (23:32 +0000)]
Make NEON single-precision FP support the default for cortex-a8 (again).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78430
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 7 Aug 2009 23:16:27 +0000 (23:16 +0000)]
remove a bunch of now-dead crud from the asmprinter and TAI interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78428
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 7 Aug 2009 23:13:38 +0000 (23:13 +0000)]
fix the column output stuff in the asmwriter from being dynamic and
driven by TAI to being static, driven by tblgen. This means that a
target doesn't get impacted by this stuff at all if it doesn't opt
into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78427
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Bolka [Fri, 7 Aug 2009 22:55:26 +0000 (22:55 +0000)]
Fix copy-pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78426
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 7 Aug 2009 22:51:13 +0000 (22:51 +0000)]
Unbreak the stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78425
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 7 Aug 2009 22:49:24 +0000 (22:49 +0000)]
Modifications to dyn_cast/cast to make them work for objects too, instead of only pointers.
The use case is if you have a wrapper class:
class Base {
void *Ptr;
public:
Base() : Ptr(0) { }
operator bool() const { return Ptr; }
.....
}
and sub-wrappers that have exactly the same size:
class Sub : public Base {
public:
....
static bool classof(const Base*);
}
and in the code you would do:
void f(Base b) {
Sub sub = dyn_cast<Sub>(b);
if (sub) {
....
}
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78424
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 7 Aug 2009 22:46:00 +0000 (22:46 +0000)]
Added Mac OS X assembler style conditional assembly. I may come back and see if
I can clean this up a bit more and do way with the TheCondState and just use
the top element on the TheCondStack if not empty. Also may tweak the code
around ParseConditionalAssemblyDirectives() to simplify the AsmParser code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78423
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 7 Aug 2009 22:44:56 +0000 (22:44 +0000)]
fix comment pastos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78422
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 22:39:43 +0000 (22:39 +0000)]
Back out some of recent register scavenger change by John Mosby. It broke a number of ARM tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78421
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 7 Aug 2009 22:37:20 +0000 (22:37 +0000)]
avoid this libcall with long inline expansion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78420
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 7 Aug 2009 22:36:50 +0000 (22:36 +0000)]
2 more vdup.32 cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78419
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 22:36:37 +0000 (22:36 +0000)]
A big oops. Thumb1 default CC is a def of CPSR, not a use of CPSR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78418
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 7 Aug 2009 22:27:19 +0000 (22:27 +0000)]
strength reduce anonymous namespace to static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78417
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 7 Aug 2009 22:26:50 +0000 (22:26 +0000)]
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78416
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 7 Aug 2009 21:33:25 +0000 (21:33 +0000)]
Reformatting of lines. Put multiple DEBUG statements under one DEBUG statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78411
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 21:19:10 +0000 (21:19 +0000)]
Thumb2 32-bit ldm / stm needs .w suffix if submode is ia.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78410
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 21:01:44 +0000 (21:01 +0000)]
llvm-mc/AsmMatcher: Move emit for register -> enum matcher into a separate routine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78408
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 20:50:58 +0000 (20:50 +0000)]
XFAIL 2006-11-06-StackTrace.cpp on powerpc-apple-darwin9 until someone feels
motivated to fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78406
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 20:50:09 +0000 (20:50 +0000)]
MSVC warning fixes; patch by Stein Roger!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78405
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 20:33:39 +0000 (20:33 +0000)]
llvm-mc/AsmMatcher: Tweaks in response to feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78404
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Fri, 7 Aug 2009 19:54:29 +0000 (19:54 +0000)]
To catch bugs like the one fixed in
http://llvm.org/viewvc/llvm-project?view=rev&revision=78127, I'm changing the
ExecutionEngine's global mappings to hold AssertingVH<const GlobalValue>. That
way, if unregistering a mapping fails to actually unregister it, we'll get an
assert. Running the jit nightly tests didn't uncover any actual instances of
the problem.
This also uncovered the fact that AssertingVH<const X> didn't work, so I fixed
that too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78400
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 19:34:52 +0000 (19:34 +0000)]
This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78399
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 19:34:35 +0000 (19:34 +0000)]
Use 16-bit tMOVgpr2gpr instead of tMOVr to copy GPR registers in Thumb2 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78398
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 19:30:41 +0000 (19:30 +0000)]
Fix support to use NEON for single precision fp math.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78397
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Bolka [Fri, 7 Aug 2009 18:23:41 +0000 (18:23 +0000)]
SIV/MIV classification for LDA.
LoopDependenceAnalysis::getLoops is currently O(N*M) for a loop-nest of
depth N and a compound SCEV of M atomic SCEVs. As both N and M will
typically be very small, this should not be a problem. If it turns out
to be one, rewriting getLoops as SCEVVisitor will reduce complexity to
O(M).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78394
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 7 Aug 2009 17:41:29 +0000 (17:41 +0000)]
Rewrite previous patch to follow Chris' stylistic
preference; no functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78391
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 7 Aug 2009 17:16:44 +0000 (17:16 +0000)]
Fix dom frontier update. This fixes PR4667.
Patch by Jakub Staszak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78388
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Bolka [Fri, 7 Aug 2009 15:42:32 +0000 (15:42 +0000)]
Fix Strong-SIV testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78384
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 7 Aug 2009 11:00:02 +0000 (11:00 +0000)]
Minor fixes to avoid using invalid debugloc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78383
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 7 Aug 2009 10:42:28 +0000 (10:42 +0000)]
Simplify code and avoid allocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78382
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 09:06:38 +0000 (09:06 +0000)]
Improve disabling of X86 AsmMatcher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78381
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 08:45:03 +0000 (08:45 +0000)]
Disable X86 AsmMatcher for now, it is causing gcc-4.0 to run out of memory on
i386-apple-darwin9. This presumably will get fixed once the generated code
improves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78379
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 08:26:05 +0000 (08:26 +0000)]
llvm-mc/AsmMatcher: Move to a slightly more sane matching design.
- Still not very sane, but a least its not 60k lines on X86. :)
- In terms of correctness, currently some things are hard wired for X86, and we
still don't properly resolve ambiguities (this is ignoring the instructions
we don't even match due to funny .td stuff or other corner cases).
The high level changes:
1. Represent tokens which are significant for matching explicitly as separate
operands. This uniformly handles not only the instruction mnemonic, but
also 'signficiant' syntax like the '*' in "call * ...".
2. Separate the matching of operands to an instruction from the construction of
the MCInst. In theory this can be done during matching, but since the number
of variations is small I think it makes sense to decompose the problems.
3. Improved a few of the mechanisms to at least successfully flatten / tokenize
the assembly strings for PowerPC and ARM.
4. The comment at the top of AsmMatcherEmitter.cpp explains the approach I'm
moving towards for handling ambiguous instructions. The high-bit is to infer
a partial ordering of the operand classes (and force the user to specify one
if we can't) and use that to resolve ambiguities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78378
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 07:35:21 +0000 (07:35 +0000)]
Error out, rather than infinite looping, if constant island pass can't converge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78377
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 07:14:14 +0000 (07:14 +0000)]
Another coalescer bug. When a dead copy is eliminated, transfer the kill to a def of the exact register rather than a super-register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78376
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 05:45:07 +0000 (05:45 +0000)]
tBfar is bl, which clobbers LR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78370
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 7 Aug 2009 05:44:27 +0000 (05:44 +0000)]
Run memsel inserter just before emit assembly to avoid tinkering by other passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78369
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 03:59:06 +0000 (03:59 +0000)]
Update CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78367
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 7 Aug 2009 03:52:07 +0000 (03:52 +0000)]
Remove unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78366
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 7 Aug 2009 02:17:44 +0000 (02:17 +0000)]
These should be expanded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78365
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 7 Aug 2009 01:43:45 +0000 (01:43 +0000)]
Use std::string() instead of std::string("").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78364
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 7 Aug 2009 01:32:21 +0000 (01:32 +0000)]
Fix a bunch of namespace pollution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78363
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 7 Aug 2009 01:26:06 +0000 (01:26 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78362
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 00:34:42 +0000 (00:34 +0000)]
It turns out most of the thumb2 instructions are not allowed to touch SP. The semantics of such instructions are unpredictable. We have just been lucky that tests have been passing.
This patch takes pain to ensure all the PEI lowering code does the right thing when lowering frame indices, insert code to manipulate stack pointers, etc. It's also custom lowering dynamic stack alloc into pseudo instructions so we can insert the right instructions at scheduling time.
This fixes PR4659 and PR4682.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78361
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Aug 2009 00:28:58 +0000 (00:28 +0000)]
Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78360
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 7 Aug 2009 00:25:12 +0000 (00:25 +0000)]
Added legal stuff, fixed some formatting issues. Removed the graph generator stuff as it was only meant for debugging the solver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78359
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 7 Aug 2009 00:04:42 +0000 (00:04 +0000)]
Add the testcase from PR 4668. This works at the
moment, but it's a fragile area.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78358
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 6 Aug 2009 23:32:48 +0000 (23:32 +0000)]
New C++ PBQP solver. Currently about as fast (read _slow_) as the old C based solver, but I'll be working to improve that. The PBQP allocator has been updated to use the new solver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78354
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 6 Aug 2009 22:56:40 +0000 (22:56 +0000)]
Fix PR 4626, a crash in branch folding after OptimizeBlock
produced a CFG it wasn't prepared for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78351
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 6 Aug 2009 22:45:51 +0000 (22:45 +0000)]
Use stripPointerCasts instead of partially rewriting it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78350
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 6 Aug 2009 21:54:23 +0000 (21:54 +0000)]
Vanity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78345
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Thu, 6 Aug 2009 21:31:35 +0000 (21:31 +0000)]
Output the new StructType constructor, which takes the context of the
module as first argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78340
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 6 Aug 2009 21:19:03 +0000 (21:19 +0000)]
Get rid of RegScavenger::backwards() before the bitrot spreads.
If we need it one day, there is nothing wrong with putting it back in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78337
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 6 Aug 2009 20:57:44 +0000 (20:57 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78335
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 6 Aug 2009 20:53:24 +0000 (20:53 +0000)]
Use DebugInfoFinder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78334
91177308-0d34-0410-b5e6-
96231b3b80d8