Jakob Stoklund Olesen
38b6d494d5
Add MachineLoopRange comparators for sorting loop lists by number and by area.
...
llvm-svn: 122073
2010-12-17 18:13:52 +00:00
Owen Anderson
1294ea7d53
Reapply r121905 (automatic synthesis of @llvm.sadd.with.overflow) with a fix for a bug that manifested itself
...
on the DragonEgg self-host bot. Unfortunately, the testcase is pretty messy and doesn't reduce well due to
interactions with other parts of InstCombine.
llvm-svn: 122072
2010-12-17 18:08:00 +00:00
Rafael Espindola
d11460a65b
Store and free the TargetObjectWriter.
...
llvm-svn: 122070
2010-12-17 18:01:31 +00:00
Rafael Espindola
6b5e56c2b1
Stub out explicit MCELFObjectTargetWriter interface.
...
llvm-svn: 122067
2010-12-17 17:45:22 +00:00
Rafael Espindola
f0e24d426a
Move createELFObjectWriter to its own header.
...
llvm-svn: 122064
2010-12-17 16:59:53 +00:00
Benjamin Kramer
e5f49c4ff2
SimplifyCFG: Ranges can be larger than 64 bits. Fixes Release-selfhost build.
...
llvm-svn: 122054
2010-12-17 10:48:14 +00:00
Benjamin Kramer
a29e1bf8ad
Fix mismatched new[]/delete.
...
llvm-svn: 122053
2010-12-17 09:56:50 +00:00
Kalle Raiskila
affe15fd67
Don't feed 19 bit immediates to ILA.
...
Patch (slightly modified) by Visa Putkinen.
llvm-svn: 122052
2010-12-17 09:36:09 +00:00
Rafael Espindola
df63335844
Use getFixupKindInfo to implement isFixupKindPCRel, ELF version.
...
llvm-svn: 122050
2010-12-17 07:28:17 +00:00
Chris Lattner
d14b0f1db7
improve switch formation to handle small range
...
comparisons formed by comparisons. For example,
this:
void foo(unsigned x) {
if (x == 0 || x == 1 || x == 3 || x == 4 || x == 6)
bar();
}
compiles into:
_foo: ## @foo
## BB#0: ## %entry
cmpl $6, %edi
ja LBB0_2
## BB#1: ## %entry
movl %edi, %eax
movl $91, %ecx
btq %rax, %rcx
jb LBB0_3
instead of:
_foo: ## @foo
## BB#0: ## %entry
cmpl $2, %edi
jb LBB0_4
## BB#1: ## %switch.early.test
cmpl $6, %edi
ja LBB0_3
## BB#2: ## %switch.early.test
movl %edi, %eax
movl $88, %ecx
btq %rax, %rcx
jb LBB0_4
This catches a bunch of cases in GCC, which look like this:
%804 = load i32* @which_alternative, align 4, !tbaa !0
%805 = icmp ult i32 %804, 2
%806 = icmp eq i32 %804, 3
%or.cond121 = or i1 %805, %806
%807 = icmp eq i32 %804, 4
%or.cond124 = or i1 %or.cond121, %807
br i1 %or.cond124, label %.thread, label %808
turning this into a range comparison.
llvm-svn: 122045
2010-12-17 06:20:15 +00:00
Daniel Dunbar
e054a782fc
MC/ARM: Use aggressive symbol folding (important for jump tables, for example).
...
llvm-svn: 122044
2010-12-17 06:00:24 +00:00
Daniel Dunbar
137d422e50
MC/Expr: Implemnt more aggressive folding during symbol evaluation using
...
IsSymbolRefDifferenceFullyResolved(). For example, we will now fold away
something like:
--
_a:
...
L0:
...
L1:
...
.long (L1 - L0) / 2
--
llvm-svn: 122043
2010-12-17 05:50:33 +00:00
Daniel Dunbar
2ee6c9b8c9
MC/Mach-O: On second thought, use a custom hook for enabling aggressive
...
IsSymbolRefDifferenceFullyResolved, it turns out this does change behavior on
enough cases for x86-32 that I would rather wait a bit on it.
- In practice, we will want to change this eventually because it only means we
generate less relocations (it also eliminates the need for the horrible
'.set' hack that Darwin requires in some places).
llvm-svn: 122042
2010-12-17 05:50:29 +00:00
Daniel Dunbar
b27bb86ba5
MC/Mach-O: Implement IsSymbolRefDifferenceFullyResolved.
...
- Unlike for fixups, we always do the "reliable" thing (not just for x86_64).
- Since Darwin 'as' would typically reject things that using this will allow,
we don't need to worry about compatibility.
llvm-svn: 122038
2010-12-17 04:54:58 +00:00
Daniel Dunbar
f2adf782ab
MC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format specific hook.
...
- Currently just has stub implementations for Mach-O, ELF, and COFF.
llvm-svn: 122037
2010-12-17 04:54:54 +00:00
Jakob Stoklund Olesen
9c7f3a46d8
Provide LiveIntervalUnion::Query::checkLoopInterference.
...
This is a three-way interval list intersection between a virtual register, a
live interval union, and a loop. It will be used to identify interference-free
loops for live range splitting.
llvm-svn: 122034
2010-12-17 04:09:47 +00:00
Daniel Dunbar
50269280f8
MC/Assembler: Strip out object writer arguments, now that it is always available
...
-- and remove FIXME asking for the same!
llvm-svn: 122032
2010-12-17 02:45:59 +00:00
Daniel Dunbar
42a037abb1
MC/Assembler: Make the MCObjectWriter available through the lifetime of the
...
assembler.
llvm-svn: 122031
2010-12-17 02:45:41 +00:00
Jim Grosbach
f638b26f17
Trailing whitespace and 80 column fixups.
...
llvm-svn: 122026
2010-12-17 02:10:59 +00:00
Daniel Dunbar
d2867f13a0
MC/Target: Remove HasScatteredSymbols target hook variable, which has been
...
superceded and was effectively dead.
llvm-svn: 122024
2010-12-17 02:06:08 +00:00
Daniel Dunbar
e491ea4630
MC/Expr: Simplify.
...
llvm-svn: 122023
2010-12-17 02:05:45 +00:00
Bob Wilson
bfc6904fc6
Fix crash compiling a QQQQ REG_SEQUENCE for a Neon vld3_lane operation.
...
Radar 8776599
llvm-svn: 122018
2010-12-17 01:21:12 +00:00
Bob Wilson
261aad8e16
Use PairDRegs to implement ConcatVectors. No functionality change.
...
llvm-svn: 122017
2010-12-17 01:21:08 +00:00
Bob Wilson
137dcdba8a
Fix a comment typo.
...
llvm-svn: 122016
2010-12-17 01:21:05 +00:00
Dan Gohman
93dc2b808f
Revert r64460. strtol and friends cannot be marked readonly, even with
...
a null endptr argument, because they may write to errno.
This fixes a seflhost miscompile observed on Linux targets when TBAA
was enabled.
llvm-svn: 122014
2010-12-17 01:09:43 +00:00
Daniel Dunbar
f89156da92
MC: Remove another dead MCAssembler argument, and update clients.
...
llvm-svn: 122013
2010-12-17 01:07:35 +00:00
Daniel Dunbar
f15aeb8d01
MC: Remove dead MCAssembler argument -- Rafael, can you check the FIXME I added
...
here?
llvm-svn: 122012
2010-12-17 01:07:31 +00:00
Daniel Dunbar
9af1335b5d
MC: Simplify (remove unnecessary MCAssembler argument, obsoleted by containment
...
in MCAsmLayout).
llvm-svn: 122011
2010-12-17 01:07:28 +00:00
Daniel Dunbar
33d571e2ae
Write => in a more normal form.
...
llvm-svn: 122009
2010-12-17 01:07:22 +00:00
Daniel Dunbar
76793bac89
MC/Expr: Simplify (and add a FIXME).
...
llvm-svn: 122008
2010-12-17 01:07:20 +00:00
Rafael Espindola
32c74ea3ab
"Fix" FDE alignment to match what gas does.
...
llvm-svn: 122006
2010-12-17 00:28:02 +00:00
Rafael Espindola
654cc4a81c
Make pushq produce signed relocations.
...
llvm-svn: 122005
2010-12-16 22:50:01 +00:00
Wesley Peck
266f4092d7
Fix MBlaze backend call instructions so that arguments passed through registers
...
are correctly marked as used. This removes a hack where the call instructions
marked all possible argument registers as used in the tablegen description.
llvm-svn: 121994
2010-12-16 19:41:31 +00:00
Jim Grosbach
b5743b9d76
Pseudo-ize the Thumb1 tBfar pattern. rdar://8777974
...
llvm-svn: 121990
2010-12-16 19:11:16 +00:00
Daniel Dunbar
395a09922b
MC/Expr: Add a doxyment.
...
llvm-svn: 121988
2010-12-16 18:36:25 +00:00
Daniel Dunbar
03fcccbb47
MC/Mach-O: Lift some MachObjectWriter arguments into the target specific
...
interface.
llvm-svn: 121981
2010-12-16 17:21:02 +00:00
Daniel Dunbar
8888a9604d
MC/Mach-O: Stub out explicit MCMachObjectTargetWriter interface.
...
llvm-svn: 121973
2010-12-16 16:09:19 +00:00
Daniel Dunbar
7ee218127a
Fix indentation (per style guide).
...
llvm-svn: 121972
2010-12-16 16:08:43 +00:00
Daniel Dunbar
73b8713d7c
MC/Mach-O: Move createMachObjectWriter into MCMachObjectWriter.h.
...
llvm-svn: 121971
2010-12-16 16:08:33 +00:00
Daniel Dunbar
9d1ed19982
MC/Mach-O: Use fixup info instead of hard coded list.
...
llvm-svn: 121970
2010-12-16 15:42:31 +00:00
Frits van Bommel
9bbe849fc3
Fix a bug in the loop in JumpThreading::ProcessThreadableEdges() where it could falsely produce a MultipleDestSentinel value if the first predecessor ended with an 'indirectbr'. If that happened, it caused an unnecessary FindMostPopularDest() call.
...
This wasn't a correctness problem, but it broke the fast path for single-predecessor blocks.
llvm-svn: 121966
2010-12-16 12:16:00 +00:00
Duncan Sands
8d1ab6f6e1
Speculatively revert commit 121905 since it looks like it might have broken the
...
dragonegg self-host buildbot. Original commit message:
Add an InstCombine transform to recognize instances of manual overflow-safe addition
(performing the addition in a wider type and explicitly checking for overflow), and
fold them down to intrinsics. This currently only supports signed-addition, but could
be generalized if someone works out the magic constant formulas for other operations.
llvm-svn: 121965
2010-12-16 09:40:54 +00:00
Michael J. Spencer
39a0ffc394
MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.
...
llvm-svn: 121958
2010-12-16 03:29:14 +00:00
Daniel Dunbar
0c9d9fdd81
MC: Move target specific fixup info descriptors to TargetAsmBackend instead of
...
the MCCodeEmitter, which seems like a better organization.
- Also, cleaned up some magic constants while in the area.
llvm-svn: 121953
2010-12-16 03:20:06 +00:00
Jason W Kim
4c1386add9
1. ARM/MC/ELF: A few more ELF relocs for .o
...
2. Fixed EmitLocalCommonSymbol for ELF (Yes, they exist. :)
Test added.
llvm-svn: 121951
2010-12-16 03:12:17 +00:00
Daniel Dunbar
ecd0c8a557
MC: Make TargetAsmBackend available to the AsmStreamer.
...
- Treaty talks on the non-proliferation of MC objects broke down.
llvm-svn: 121949
2010-12-16 03:05:59 +00:00
Dan Gohman
91ab4ffd96
Update a comment.
...
llvm-svn: 121946
2010-12-16 02:55:10 +00:00
Dan Gohman
e1a17a3473
Make memcpyopt TBAA-aware.
...
llvm-svn: 121944
2010-12-16 02:51:19 +00:00
NAKAMURA Takumi
2e071faed8
lib/Support/regexec.c: Let Regex LLP64-aware.
...
On LLP64 Win64, 'states1' (for small version) was expanded to 'char *' for large version. Thus small version would be mischosen when nstates > 32 regardless of sizeof(long) on Win64.
llvm-svn: 121942
2010-12-16 01:48:15 +00:00
Matt Beaumont-Gay
e9afc740a8
Delete an extra "Imm5 = ", caught by GCC's -Wsequence-point but not by Clang
...
(see PR4579).
llvm-svn: 121939
2010-12-16 01:34:26 +00:00