OSDN Git Service
Nick Lewycky [Mon, 24 Sep 2012 22:09:10 +0000 (22:09 +0000)]
Teach DSE that strcpy, strncpy, strcat and strncat are all stores which may be
dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164561
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 24 Sep 2012 22:07:09 +0000 (22:07 +0000)]
Move all the calls to AA.getTargetLibraryInfo() to using a TLI member variable.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164560
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 24 Sep 2012 20:47:19 +0000 (20:47 +0000)]
Specify MachinePointerInfo as refering to the argument value and offset of the
store when handling byval arguments. Thus preventing reordering of the store
with load with post-RA scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164553
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 24 Sep 2012 19:32:29 +0000 (19:32 +0000)]
Rather then have a wrapper function, have tblgen instantiate the implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164548
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Mon, 24 Sep 2012 17:22:43 +0000 (17:22 +0000)]
Add missing : in CHECK line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164540
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Mon, 24 Sep 2012 17:10:03 +0000 (17:10 +0000)]
Add missing check for presence of target data.
This avoids a crash in visitAllocaInst when target data isn't available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164539
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 24 Sep 2012 01:10:25 +0000 (01:10 +0000)]
Enable the new SROA pass by default.
Queue the fallout. ;]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164480
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 24 Sep 2012 00:34:20 +0000 (00:34 +0000)]
Address one of the original FIXMEs for the new SROA pass by implementing
integer promotion analogous to vector promotion. When there is an
integer alloca being accessed both as its integer type and as a narrower
integer type, promote the narrower access to "insert" and "extract" the
smaller integer from the larger one, and make the integer alloca
a candidate for promotion.
In the new formulation, we don't care about target legal integer or use
thresholds to control things. Instead, we only perform this promotion to
an integer type which the frontend has already emitted a load or store
for. This bounds the scope and prevents optimization passes from
coalescing larger and larger entities into a single integer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164479
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 23 Sep 2012 15:53:47 +0000 (15:53 +0000)]
Emit dtors into proper section while compiling in vcpp-compatible mode.
Patch by Kai!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164476
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 23 Sep 2012 11:43:14 +0000 (11:43 +0000)]
Switch to a signed representation for the dynamic offsets while walking
across the uses of the alloca. It's entirely possible for negative
numbers to come up here, and in some rare cases simply doing the 2's
complement arithmetic isn't the correct decision. Notably, we can't zext
the index of the GEP. The definition of GEP is that these offsets are
sign extended or truncated to the size of the pointer, and then wrapping
2's complement arithmetic used.
This patch fixes an issue that comes up with *no* input from the
buildbots or bootstrap afaict. The only place where it manifested,
disturbingly, is Clang's own regression test suite. A reduced and
targeted collection of tests are added to cope with this. Note that I've
tried to pin down the potential cases of overflow, but may have missed
some cases. I've tried to add a few cases to test this, but its hard
because LLVM has quite limited support for >64bit constructs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164475
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 23 Sep 2012 03:58:21 +0000 (03:58 +0000)]
Don't do actual work inside an assert statement. Fixes PR11760!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164474
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Sun, 23 Sep 2012 02:41:47 +0000 (02:41 +0000)]
Revise test to avoid using of 'grep'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164472
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 23 Sep 2012 02:12:10 +0000 (02:12 +0000)]
Add LLVM_OVERRIDE to methods that override their base classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164471
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Sat, 22 Sep 2012 21:07:59 +0000 (21:07 +0000)]
Enhance test case of atomic16 to verify inst encoding fixed in r164453.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164465
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 22 Sep 2012 13:12:28 +0000 (13:12 +0000)]
ARMInstPrinter.cpp: Fix a warning in -Asserts. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164459
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 22 Sep 2012 13:12:22 +0000 (13:12 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164458
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 22 Sep 2012 11:18:19 +0000 (11:18 +0000)]
Fix edge cases of ARM shift operands in arith instructions.
As before with load instructions, oddities like "asr #32", "rrx" could
be printed incorrectly.
Patch by Chris Lidbury.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164456
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 22 Sep 2012 11:18:12 +0000 (11:18 +0000)]
Fix the handling of edge cases in ARM shifted operands.
This patch fixes load/store instructions to handle less common cases
like "asr #32", "rrx" properly throughout the MC layer.
Patch by Chris Lidbury.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164455
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Sat, 22 Sep 2012 05:41:15 +0000 (05:41 +0000)]
Fix 16-bit atomic inst encoding and keep pseudo-inst starting with '#'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164453
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Sat, 22 Sep 2012 03:39:42 +0000 (03:39 +0000)]
Fix typo in r164357
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164452
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 22 Sep 2012 02:24:21 +0000 (02:24 +0000)]
Machine Model (-schedmodel only). Added SchedAliases.
Allow subtargets to tie SchedReadWrite types to processor specific
sequences or variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164451
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Sat, 22 Sep 2012 01:24:21 +0000 (01:24 +0000)]
Add llvm::getOrdinalSuffix to get the appropriate -st, -nd, -rd, -th suffix.
Used by clang to print parameter indexes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164440
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Sat, 22 Sep 2012 01:24:18 +0000 (01:24 +0000)]
Casting: assert that pointer arguments to isa<> are non-null.
This silences several analyzer warnings within LLVM, and provides a slightly
nicer crash experience when someone calls isa<>, cast<>, or dyn_cast<> with
a null pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164439
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Sat, 22 Sep 2012 01:24:16 +0000 (01:24 +0000)]
DenseMap: assert that we have found a bucket before we try to insert into it.
This silences literally dozens of analyzer warnings on LLVM (since DenseMap
is such a commonly-used class).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164438
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 22 Sep 2012 00:07:12 +0000 (00:07 +0000)]
MIPS DSP: Add immediate leaves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164435
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 22 Sep 2012 00:06:06 +0000 (00:06 +0000)]
MIPS DSP: Add predicates and instruction template.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164434
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Sep 2012 23:58:31 +0000 (23:58 +0000)]
Add MIPS DSP register classes. Set actions of DSP vector operations and override
TargetLowering's callback functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164431
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Sep 2012 23:52:47 +0000 (23:52 +0000)]
SelectionDAG node enums for MIPS DSP nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164430
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Sep 2012 23:48:37 +0000 (23:48 +0000)]
Add MIPS accumulator and DSP control registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164429
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Sep 2012 23:41:49 +0000 (23:41 +0000)]
Add flags and feature bits for mips dsp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164428
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 21 Sep 2012 23:36:40 +0000 (23:36 +0000)]
Fix a case where the new SROA pass failed to zap dead operands to
selects with a constant condition. This resulted in the operands
remaining live through the SROA rewriter. Most of the time, this just
caused some dead allocas to persist and get zapped by later passes, but
in one case found by Joerg, it caused a crash when we tried to *promote*
the alloca despite it having this dead use. We already have the
mechanisms in place to handle this, just wire select up to them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164427
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 21 Sep 2012 23:03:29 +0000 (23:03 +0000)]
Add an --enable-backtraces option to configure to determine
whether or not we want to print out backtrace information. Useful
for libraries that don't need backtrace information on a crash.
rdar://
11844710
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164426
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 21 Sep 2012 23:00:37 +0000 (23:00 +0000)]
Add an MDBuilder utility for creating !tbaa.struct nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164425
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 21 Sep 2012 22:49:06 +0000 (22:49 +0000)]
[CMake] Respect LLVM_BUILD_RUNTIME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164424
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 21 Sep 2012 22:21:26 +0000 (22:21 +0000)]
[ms-inline asm] Expose the mnemonicIsValid() function in the AsmParser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164420
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 21 Sep 2012 22:18:52 +0000 (22:18 +0000)]
Have the DbgVariable "isArtificial" and "isObjectPointer" not
care about it being an argument variable so that we can decide
that captured block and lambda vars that don't happen to
be arguments could be an argument pointer.
Add the object pointer for one case onto the subprogram die.
rdar://
12001329
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164419
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 21 Sep 2012 21:08:46 +0000 (21:08 +0000)]
Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164415
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 21 Sep 2012 20:51:43 +0000 (20:51 +0000)]
Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164414
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 21 Sep 2012 20:04:28 +0000 (20:04 +0000)]
Fix a significant recent(?) regression. StackSlotColoring no longer did anything
because LiveStackAnalysis was not preserved by VirtRegWriter. This caused
big stack usage regression in some cases.
rdar://
12340383
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164408
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 21 Sep 2012 19:48:16 +0000 (19:48 +0000)]
docs: Fix long-standing typo in yaml2obj.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 21 Sep 2012 19:25:59 +0000 (19:25 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164406
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 21 Sep 2012 18:41:30 +0000 (18:41 +0000)]
Say "bytes" instead of "address units", since that's what the
rest of LangRef uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164402
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 21 Sep 2012 18:21:48 +0000 (18:21 +0000)]
Document the new !tbaa.struct metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164398
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 21 Sep 2012 18:03:02 +0000 (18:03 +0000)]
Add missing 'to' and rephrase an explanation of GCC's assumptions.
Wordsmithing by Matt Beaumont-Gay in response to r164389.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164395
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 21 Sep 2012 17:47:36 +0000 (17:47 +0000)]
Document "do not use defaults in covered switch-over-enum" coding standard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164389
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 21 Sep 2012 17:27:23 +0000 (17:27 +0000)]
LoopIdiom: Give up when the loop is not in canonical form.
We rely on it when doing the transforms. This can happen when there is an
indirectbr in the loop.
Fixes PR13892.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164383
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 21 Sep 2012 16:58:35 +0000 (16:58 +0000)]
[fast-isel] Fallback to SelectionDAG isel if we require strict alignment for
non-aligned i32 loads/stores.
rdar://
12304911
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164381
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 21 Sep 2012 16:26:41 +0000 (16:26 +0000)]
InstCombine: Make sure we use the pre-zext type when creating a constant of a value that is zext'd.
Fixes PR13250.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164377
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 21 Sep 2012 16:07:28 +0000 (16:07 +0000)]
Encapsulate the "construct*AlignmentFromInt" functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164373
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 21 Sep 2012 16:03:03 +0000 (16:03 +0000)]
Fix a typo in r164357
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164372
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 21 Sep 2012 15:26:34 +0000 (15:26 +0000)]
Clarify comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164371
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 21 Sep 2012 15:26:31 +0000 (15:26 +0000)]
Make the 'get*AlignmentFromAttr' functions into member functions within the Attributes class. Now with fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164370
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 21 Sep 2012 14:34:31 +0000 (14:34 +0000)]
BitcodeReader: Correctly insert blockaddress constant referring to a already parsed function.
We inserted a placeholder that was never replaced because the function was
already visited. Assert that all placeholders have been resolved when tearing
down the bitcode reader.
Fixes PR13895.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164369
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 21 Sep 2012 07:08:08 +0000 (07:08 +0000)]
Fix SymbolRef::getAddress implementation for ELF. The 'value' field in symbol table entry should be treated differently for relocatable and relocated files. This patch fixes symbol addresses printed by llvm-nm for executables and shared objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164365
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 21 Sep 2012 05:19:19 +0000 (05:19 +0000)]
llvm/test/CodeGen/X86/pr5145.ll: Tweak expressions to match for darwin target.
.LBB0_1: # Linux
LBB0_1: # Darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164362
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 21 Sep 2012 05:06:40 +0000 (05:06 +0000)]
Cortex-A9 latency fixes (w/ -schedmodel only).
Quick review against the manual revealed a few obvious mistakes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164361
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 21 Sep 2012 03:18:52 +0000 (03:18 +0000)]
Add missing i8 max/min/umax/umin support
- Fix PR5145 and turn on test 8-bit atomic ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164358
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 21 Sep 2012 03:00:17 +0000 (03:00 +0000)]
Revise td of X86 atomic instructions
- Rewirte most atomic instructions in templates for both better
maintenance and future extensions, such as HLE in TSX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164357
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 21 Sep 2012 02:46:32 +0000 (02:46 +0000)]
docs: Fix Sphinx warning over Atomics.rst.
Atomics.rst was not linked into the toctree.
Docs now build warning-free!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164356
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 21 Sep 2012 02:46:30 +0000 (02:46 +0000)]
docs: Fix Sphinx warning over yaml2obj.rst.
yaml2obj.rst was not included in the toctree
Input from Michael Spencer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164355
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 21 Sep 2012 02:21:30 +0000 (02:21 +0000)]
Mips16FrameLowering.cpp: Remove unused TII introduced in r164349. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164354
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 21 Sep 2012 01:15:05 +0000 (01:15 +0000)]
llvm/test/CodeGen/ARM/fast-isel.ll: Fix possible typos, s/@unaligned_i16_store/@unaligned_i16_load/g.
I guess this had apparently passed in +Asserts possibly due to verborsity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164350
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 21 Sep 2012 01:08:16 +0000 (01:08 +0000)]
Properly save and restore RA and Mips16 callee save registers S0,S1
Patch by Reed Kotler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164349
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 21 Sep 2012 00:47:08 +0000 (00:47 +0000)]
Testcase does not need to be this strict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164347
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 21 Sep 2012 00:43:18 +0000 (00:43 +0000)]
Add newline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164346
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 21 Sep 2012 00:41:42 +0000 (00:41 +0000)]
[fast-isel] Fallback to SelectionDAG isel if we require strict alignment for
non-halfword-aligned i16 loads/stores.
rdar://
12304911
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164345
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 21 Sep 2012 00:36:42 +0000 (00:36 +0000)]
Tidy up. Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164344
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 21 Sep 2012 00:26:53 +0000 (00:26 +0000)]
Tidy up. Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164343
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 21 Sep 2012 00:18:20 +0000 (00:18 +0000)]
ARM: Use a dedicated intrinsic for vector bitwise select.
The expression based expansion too often results in IR level optimizations
splitting the intermediate values into separate basic blocks, preventing
the formation of the VBSL instruction as the code author intended. In
particular, LICM would often hoist part of the computation out of a loop.
rdar://
11011471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164340
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 20 Sep 2012 23:08:42 +0000 (23:08 +0000)]
Ignore PHI-defs for -new-coalescer interference checks.
A PHI can't create interference on its own. If two live ranges interfere
at a PHI, they must also interfere when leaving one of the PHI
predecessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164330
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 20 Sep 2012 23:08:39 +0000 (23:08 +0000)]
Extend -new-coalescer SSA update to handle mapped values as well.
The old-fashioned many-to-one value mapping doesn't always work when
merging vector lanes. A value can map to multiple different values, and
it can even be necessary to insert new PHIs.
When a value number is defined by a copy from a value number that
required SSa update, include the live range of the copied value number
in the SSA update as well. It is not necessarily a copy of the original
value number any longer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164329
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 20 Sep 2012 22:51:57 +0000 (22:51 +0000)]
Only emit DW_AT_object_pointer if this is a definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164326
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 20 Sep 2012 22:37:36 +0000 (22:37 +0000)]
SimplifyCFG: sink common codes from IF, ELSE blocks down to END block.
We already have HoistThenElseCodeToIf, this patch implements
SinkThenElseCodeToEnd. When END block has only two predecessors and each
predecessor terminates with unconditional branches, we compare instructions in
IF and ELSE blocks backwards and check whether we can sink the common
instructions down.
rdar://
12191395
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164325
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 20 Sep 2012 21:35:21 +0000 (21:35 +0000)]
Try to make these tests more portable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164320
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 20 Sep 2012 19:54:13 +0000 (19:54 +0000)]
Fix broken check lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164317
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 20 Sep 2012 17:02:04 +0000 (17:02 +0000)]
Fix function names in coding style examples
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164311
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 20 Sep 2012 16:59:57 +0000 (16:59 +0000)]
Revert r164308 to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164309
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 20 Sep 2012 16:27:05 +0000 (16:27 +0000)]
Make the 'get*AlignmentFromAttr' functions into member functions within the Attributes class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164308
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 20 Sep 2012 15:20:36 +0000 (15:20 +0000)]
Remove more bare uses of the different Attribute enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164307
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Thu, 20 Sep 2012 14:59:42 +0000 (14:59 +0000)]
Specify cpu to get the correct instruction ordering. Remove XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164306
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 20 Sep 2012 14:44:42 +0000 (14:44 +0000)]
Make the 'getAsString' function a method of the Attributes class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164305
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 20 Sep 2012 08:53:31 +0000 (08:53 +0000)]
Fix 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164297
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 20 Sep 2012 08:46:30 +0000 (08:46 +0000)]
Make sure lli compiles all code before invalidating instruction caches.
Patch from Amara Emerson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164296
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 20 Sep 2012 06:14:08 +0000 (06:14 +0000)]
Change enum type in a static table to uint8_t instead. Saves about 700 hundred bytes of static data. Change unsigned char in same table to uint8_t for explicitness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164285
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 20 Sep 2012 03:34:04 +0000 (03:34 +0000)]
Specify CPu to prevent failure on ATOM due to different code scheduling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164283
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Thu, 20 Sep 2012 03:20:53 +0000 (03:20 +0000)]
Fix Sphinx warnings.
Toctree was not being interlinked properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164282
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 20 Sep 2012 03:06:15 +0000 (03:06 +0000)]
Re-work X86 code generation of atomic ops with spin-loop
- Rewrite/merge pseudo-atomic instruction emitters to address the
following issue:
* Reduce one unnecessary load in spin-loop
previously the spin-loop looks like
thisMBB:
newMBB:
ld t1 = [bitinstr.addr]
op t2 = t1, [bitinstr.val]
not t3 = t2 (if Invert)
mov EAX = t1
lcs dest = [bitinstr.addr], t3 [EAX is implicit]
bz newMBB
fallthrough -->nextMBB
the 'ld' at the beginning of newMBB should be lift out of the loop
as lcs (or CMPXCHG on x86) will load the current memory value into
EAX. This loop is refined as:
thisMBB:
EAX = LOAD [MI.addr]
mainMBB:
t1 = OP [MI.val], EAX
LCMPXCHG [MI.addr], t1, [EAX is implicitly used & defined]
JNE mainMBB
sinkMBB:
* Remove immopc as, so far, all pseudo-atomic instructions has
all-register form only, there is no immedidate operand.
* Remove unnecessary attributes/modifiers in pseudo-atomic instruction
td
* Fix issues in PR13458
- Add comprehensive tests on atomic ops on various data types.
NOTE: Some of them are turned off due to missing functionality.
- Revise tests due to the new spin-loop generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164281
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Thu, 20 Sep 2012 03:05:26 +0000 (03:05 +0000)]
Sphinxify DebuggingJITedCode
LGTM by Michael Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164280
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 20 Sep 2012 02:01:06 +0000 (02:01 +0000)]
Fix static function names in CodingStandards examples.
Try not to violate conventions immediately before explaining them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164278
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 19 Sep 2012 23:54:18 +0000 (23:54 +0000)]
Convert some attribute existence queries over to use the predicate methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164268
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 19 Sep 2012 23:39:03 +0000 (23:39 +0000)]
ARM: Tidy up IntrinsicsARM.td a bit.
Make the TargetPrefix setting one big setting instead of being spread out
everywhere. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164265
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 19 Sep 2012 23:35:21 +0000 (23:35 +0000)]
Add predicates for queries on whether an attribute exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164264
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Wed, 19 Sep 2012 22:47:07 +0000 (22:47 +0000)]
Add in new data types that are used by AMDIL/ANL among others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164261
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 19 Sep 2012 22:15:06 +0000 (22:15 +0000)]
Soften the pattern-can-never-match error in TableGen into a warning. This pattern can be very useful in cases where you want to define a multiclass that covers both commutative and non-commutative operators (say, add and sub).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164256
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 19 Sep 2012 21:34:18 +0000 (21:34 +0000)]
Implement a correct copy constructor for Record. Now that we're using the ID number as a key in maps (for determinism), it is imperative that ID numbers be globally unique, even when we copy construct a Record.
This fixes some obscure failure cases involving registers defined inside multiclasses or foreach constructs that would not receive a unique ID, and would end up being omitted from the AsmMatcher tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164251
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 19 Sep 2012 21:29:18 +0000 (21:29 +0000)]
Resolve conflicts involving dead vector lanes for -new-coalescer.
A common coalescing conflict in vector code is lane insertion:
%dst = FOO
%src = BAR
%dst:ssub0 = COPY %src
The live range of %src interferes with the ssub0 lane of %dst, but that
lane is never read after %src would have clobbered it. That makes it
safe to merge the live ranges and eliminate the COPY:
%dst = FOO
%dst:ssub0 = BAR
This patch teaches the new coalescer to resolve conflicts where dead
vector lanes would be clobbered, at least as long as the clobbered
vector lanes don't escape the basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164250
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 19 Sep 2012 20:46:12 +0000 (20:46 +0000)]
This patch adds memory support functions which will later be used to implement section-specific protection handling in MCJIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164249
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Wed, 19 Sep 2012 20:36:12 +0000 (20:36 +0000)]
Add support for macro parameters/arguments delimited by spaces,
to improve compatibility with GNU as.
Based on a patch by PaX Team.
Fixed assertion failures on non-Darwin and added additional test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164248
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 19 Sep 2012 20:29:39 +0000 (20:29 +0000)]
Add support for accessing an MDNode's operands via the C binding. Patch by
Anthony Bryant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164247
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Wed, 19 Sep 2012 20:29:04 +0000 (20:29 +0000)]
Support default parameters/arguments for assembler macros.
This patch is based on the one by PaX Team.
Patch by Andy Zhang!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164246
91177308-0d34-0410-b5e6-
96231b3b80d8