1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
Commit Graph

85321 Commits

Author SHA1 Message Date
Chandler Carruth
9b73630229 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.

llvm-svn: 164475
2012-09-23 11:43:14 +00:00
Nick Lewycky
ac620030a2 Don't do actual work inside an assert statement. Fixes PR11760!
llvm-svn: 164474
2012-09-23 03:58:21 +00:00
Michael Liao
4b489dd743 Revise test to avoid using of 'grep'
llvm-svn: 164472
2012-09-23 02:41:47 +00:00
Craig Topper
36f4bfec12 Add LLVM_OVERRIDE to methods that override their base classes.
llvm-svn: 164471
2012-09-23 02:12:10 +00:00
Michael Liao
240d90ec9b Enhance test case of atomic16 to verify inst encoding fixed in r164453.
llvm-svn: 164465
2012-09-22 21:07:59 +00:00
NAKAMURA Takumi
8377e86232 ARMInstPrinter.cpp: Fix a warning in -Asserts. [-Wunused-variable]
llvm-svn: 164459
2012-09-22 13:12:28 +00:00
NAKAMURA Takumi
79a8490f7a Whitespace.
llvm-svn: 164458
2012-09-22 13:12:22 +00:00
Tim Northover
7cab153d37 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.

llvm-svn: 164456
2012-09-22 11:18:19 +00:00
Tim Northover
1c60305666 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.

llvm-svn: 164455
2012-09-22 11:18:12 +00:00
Michael Liao
3d9c40c0c8 Fix 16-bit atomic inst encoding and keep pseudo-inst starting with '#'
llvm-svn: 164453
2012-09-22 05:41:15 +00:00
Michael Liao
0a4f3eefaf Fix typo in r164357
llvm-svn: 164452
2012-09-22 03:39:42 +00:00
Andrew Trick
7a73f9d7f4 Machine Model (-schedmodel only). Added SchedAliases.
Allow subtargets to tie SchedReadWrite types to processor specific
sequences or variants.

llvm-svn: 164451
2012-09-22 02:24:21 +00:00
Jordan Rose
322d2a4afc Add llvm::getOrdinalSuffix to get the appropriate -st, -nd, -rd, -th suffix.
Used by clang to print parameter indexes.

llvm-svn: 164440
2012-09-22 01:24:21 +00:00
Jordan Rose
f8bd27333f 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.

llvm-svn: 164439
2012-09-22 01:24:18 +00:00
Jordan Rose
8632457a1a 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).

llvm-svn: 164438
2012-09-22 01:24:16 +00:00
Akira Hatanaka
cf8158381d MIPS DSP: Add immediate leaves.
llvm-svn: 164435
2012-09-22 00:07:12 +00:00
Akira Hatanaka
e8ffbb3ace MIPS DSP: Add predicates and instruction template.
llvm-svn: 164434
2012-09-22 00:06:06 +00:00
Akira Hatanaka
4acf68deb2 Add MIPS DSP register classes. Set actions of DSP vector operations and override
TargetLowering's callback functions.

llvm-svn: 164431
2012-09-21 23:58:31 +00:00
Akira Hatanaka
5ead4f3d78 SelectionDAG node enums for MIPS DSP nodes.
llvm-svn: 164430
2012-09-21 23:52:47 +00:00
Akira Hatanaka
00202df6d5 Add MIPS accumulator and DSP control registers.
llvm-svn: 164429
2012-09-21 23:48:37 +00:00
Akira Hatanaka
d89661f8bd Add flags and feature bits for mips dsp.
llvm-svn: 164428
2012-09-21 23:41:49 +00:00
Chandler Carruth
438cc8b234 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.

llvm-svn: 164427
2012-09-21 23:36:40 +00:00
Eric Christopher
8172c32318 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

llvm-svn: 164426
2012-09-21 23:03:29 +00:00
Dan Gohman
d9c407a8be Add an MDBuilder utility for creating !tbaa.struct nodes.
llvm-svn: 164425
2012-09-21 23:00:37 +00:00
Michael J. Spencer
6aa3aae5d6 [CMake] Respect LLVM_BUILD_RUNTIME.
llvm-svn: 164424
2012-09-21 22:49:06 +00:00
Chad Rosier
fd5e542cea [ms-inline asm] Expose the mnemonicIsValid() function in the AsmParser.
llvm-svn: 164420
2012-09-21 22:21:26 +00:00
Eric Christopher
b67c16fe92 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

llvm-svn: 164419
2012-09-21 22:18:52 +00:00
Chad Rosier
bfd7fc3e7e Add comment.
llvm-svn: 164415
2012-09-21 21:08:46 +00:00
Chad Rosier
2cc6afaac6 Add comment.
llvm-svn: 164414
2012-09-21 20:51:43 +00:00
Evan Cheng
cbdea3af74 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

llvm-svn: 164408
2012-09-21 20:04:28 +00:00
Sean Silva
9a9e2646a3 docs: Fix long-standing typo in yaml2obj.rst.
llvm-svn: 164407
2012-09-21 19:48:16 +00:00
Chad Rosier
64fd35f379 Whitespace.
llvm-svn: 164406
2012-09-21 19:25:59 +00:00
Dan Gohman
8242a28668 Say "bytes" instead of "address units", since that's what the
rest of LangRef uses.

llvm-svn: 164402
2012-09-21 18:41:30 +00:00
Dan Gohman
cacdd7ae8e Document the new !tbaa.struct metadata.
llvm-svn: 164398
2012-09-21 18:21:48 +00:00
David Blaikie
022673f281 Add missing 'to' and rephrase an explanation of GCC's assumptions.
Wordsmithing by Matt Beaumont-Gay in response to r164389.

llvm-svn: 164395
2012-09-21 18:03:02 +00:00
David Blaikie
2bafd0b320 Document "do not use defaults in covered switch-over-enum" coding standard.
llvm-svn: 164389
2012-09-21 17:47:36 +00:00
Benjamin Kramer
baec630d4c 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.

llvm-svn: 164383
2012-09-21 17:27:23 +00:00
Chad Rosier
a58913fc00 [fast-isel] Fallback to SelectionDAG isel if we require strict alignment for
non-aligned i32 loads/stores.
rdar://12304911

llvm-svn: 164381
2012-09-21 16:58:35 +00:00
Benjamin Kramer
3083ebd4de InstCombine: Make sure we use the pre-zext type when creating a constant of a value that is zext'd.
Fixes PR13250.

llvm-svn: 164377
2012-09-21 16:26:41 +00:00
Bill Wendling
be9626d5d1 Encapsulate the "construct*AlignmentFromInt" functions.
llvm-svn: 164373
2012-09-21 16:07:28 +00:00
Michael Liao
9a17cba52b Fix a typo in r164357
llvm-svn: 164372
2012-09-21 16:03:03 +00:00
Dmitri Gribenko
aeecde380d Clarify comment.
llvm-svn: 164371
2012-09-21 15:26:34 +00:00
Bill Wendling
38bffadcad Make the 'get*AlignmentFromAttr' functions into member functions within the Attributes class. Now with fix.
llvm-svn: 164370
2012-09-21 15:26:31 +00:00
Benjamin Kramer
fd67118ab5 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.

llvm-svn: 164369
2012-09-21 14:34:31 +00:00
Alexey Samsonov
ad52a8844e 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.
llvm-svn: 164365
2012-09-21 07:08:08 +00:00
NAKAMURA Takumi
8c966675e5 llvm/test/CodeGen/X86/pr5145.ll: Tweak expressions to match for darwin target.
.LBB0_1: # Linux
LBB0_1:  # Darwin

llvm-svn: 164362
2012-09-21 05:19:19 +00:00
Andrew Trick
2545253eda Cortex-A9 latency fixes (w/ -schedmodel only).
Quick review against the manual revealed a few obvious mistakes.

llvm-svn: 164361
2012-09-21 05:06:40 +00:00
Michael Liao
2197b133f8 Add missing i8 max/min/umax/umin support
- Fix PR5145 and turn on test 8-bit atomic ops

llvm-svn: 164358
2012-09-21 03:18:52 +00:00
Michael Liao
439a9cea68 Revise td of X86 atomic instructions
- Rewirte most atomic instructions in templates for both better
  maintenance and future extensions, such as HLE in TSX.

llvm-svn: 164357
2012-09-21 03:00:17 +00:00
Sean Silva
b15391b636 docs: Fix Sphinx warning over Atomics.rst.
Atomics.rst was not linked into the toctree.

Docs now build warning-free!

llvm-svn: 164356
2012-09-21 02:46:32 +00:00