1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

59329 Commits

Author SHA1 Message Date
Dan Gohman
a04e614c0f Record PRE predecessors with a SmallVector instead of a DenseMap, and
avoid a second pred_iterator traversal.

llvm-svn: 175001
2013-02-12 19:49:10 +00:00
Chad Rosier
3eb029b4c7 [ms-inline asm] Pass the length of the IDVal, so we can do a proper AsmRewrite.
llvm-svn: 174999
2013-02-12 19:42:32 +00:00
Chad Rosier
24b5149dc9 [ms-inline asm] Accept the emit directive as either _emit or __emit.
llvm-svn: 174998
2013-02-12 19:31:23 +00:00
Dan Gohman
79869cd16c When disabling PRE for a value is directly redundant with itself
(through a loop), don't continue to iterate through the reamining
predecessors.

llvm-svn: 174994
2013-02-12 19:05:10 +00:00
Dan Gohman
6815bf69b1 Check that pointers are removed from maps before calling delete on the pointers,
for tidiness' sake.

llvm-svn: 174988
2013-02-12 18:44:43 +00:00
Dan Gohman
69f4c8b640 Minor code simplification.
llvm-svn: 174985
2013-02-12 18:38:36 +00:00
Chad Rosier
5fc603a34e [ms-inline asm] Add support for lexing binary integers with a [bB] suffix.
This is complicated by backward labels (e.g., 0b can be both a backward label
and a binary zero).  The current implementation assumes [0-9]b is always a
label and thus it's possible for 0b and 1b to not be interpreted correctly for
ms-style inline assembly.  However, this is relatively simple to fix in the
inline assembly (i.e., drop the [bB]).

This patch also limits backward labels to [0-9]b, so that only 0b and 1b are
ambiguous.
Part of rdar://12470373

llvm-svn: 174983
2013-02-12 18:29:02 +00:00
Krzysztof Parzyszek
bb3116f965 Allow optionally generating pubnames section in DWARF info. Introduce
option "generate-dwarf-pubnames" to control it, set to "false" by default.

llvm-svn: 174981
2013-02-12 18:00:14 +00:00
Sergei Larin
e598e9d599 Equal treatment of labels and other terminators in MI DAG construction.
MI sched DAG construction allows targets to include terminators into scheduling DAG.
Extend this functionality to labels as well.

llvm-svn: 174977
2013-02-12 16:36:03 +00:00
Krzysztof Parzyszek
de39fad3d2 Add support for the pubnames section to llvm-dwarfdump.
llvm-svn: 174976
2013-02-12 16:20:28 +00:00
Jyotsna Verma
abd979fd30 Hexagon: Add support to generate predicated absolute addressing mode
instructions.

llvm-svn: 174973
2013-02-12 16:06:23 +00:00
Paul Redmond
add1aa5259 PR14562 - Truncation of left shift became undef
DAGCombiner::ReduceLoadWidth was converting (trunc i32 (shl i64 v, 32))
into (shl i32 v, 32) into undef. To prevent this, check the shift count
against the final result size.

Patch by: Kevin Schoedel
Reviewed by: Nadav Rotem

llvm-svn: 174972
2013-02-12 15:21:21 +00:00
Justin Holewinski
9a248309f0 [NVPTX] Disable vector registers
Vectors were being manually scalarized by the backend.  Instead,
let the target-independent code do all of the work.  The manual
scalarization was from a time before good target-independent support
for scalarization in LLVM. However, this forces us to specially-handle
vector loads and stores, which we can turn into PTX instructions that
produce/consume multiple operands.

llvm-svn: 174968
2013-02-12 14:18:49 +00:00
Alexander Potapenko
aa2cd19415 [ASan] Do not use kDefaultShort64bitShadowOffset on Mac, where the binaries may get mapped at 0x100000000+ and thus may interleave with the shadow.
llvm-svn: 174964
2013-02-12 12:41:12 +00:00
Michel Danzer
6e93c3c0af R600: Fix regression with shadow array sampler on pre-SI GPUs.
'R600/SI: Use proper instructions for array/shadow samplers.' removed two
cases from TEX_SHADOW. Vincent Lejeune reported on IRC that this broke some
shadow array piglit tests with the r600g driver. Reinstating the removed
cases should fix this, and still works with radeonsi as well.

I will follow up with some lit tests which would have caught the regression.

NOTE: This is a candidate for the Mesa stable branch.

Tested-by: Vincent Lejeune <vljn@ovi.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174963
2013-02-12 12:11:23 +00:00
Kostya Serebryany
b7c0f19f8a [asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. llvm part, compiler-rt part will follow
llvm-svn: 174957
2013-02-12 11:11:02 +00:00
Bill Wendling
b09441b500 Merge the collected attributes into the call instruction's attributes.
llvm-svn: 174955
2013-02-12 10:13:06 +00:00
Bill Wendling
691930eeb9 Have the bitcode writer and reader handle the new attribute references.
The bitcode writer emits a reference to the attribute group that the object at
the given index refers to. The bitcode reader is modified to read this in and
map it back to the attribute group.

llvm-svn: 174952
2013-02-12 08:13:50 +00:00
Bill Wendling
1bf6dfbbfd Use the AttributeSet as the 'key' to the map instead of the 'raw' pointer.
llvm-svn: 174950
2013-02-12 08:01:22 +00:00
Bill Wendling
03550a5d33 Support string attributes in the AttrBuilder.
llvm-svn: 174948
2013-02-12 07:56:49 +00:00
Cameron Zwarich
564bf2cf31 Don't consider definitions by other PHIs live-in when trimming a PHI source's
live range after inserting a copy at the end of a block.

llvm-svn: 174945
2013-02-12 05:48:58 +00:00
Cameron Zwarich
dbc87d3ca5 Fix indentation.
llvm-svn: 174944
2013-02-12 05:48:56 +00:00
Cameron Zwarich
044e235cfe Add a hidden option to PHIElimination to split all critical edges. This is
particularly useful for catching issues with architectures that have exotic
terminators like MIPS.

llvm-svn: 174938
2013-02-12 03:49:25 +00:00
Cameron Zwarich
12bc4a8f01 Add blocks to the LiveIntervalAnalysis RegMaskBlocks array when splitting
a critical edge.

llvm-svn: 174936
2013-02-12 03:49:20 +00:00
Cameron Zwarich
98da22672b Fix the updating of LiveIntervals after splitting a critical edge. PHI operand
live ranges should always be extended, and the only successor that should be
considered for extension of other ranges is the target of the split edge.

llvm-svn: 174935
2013-02-12 03:49:17 +00:00
Pete Cooper
223060498a Check type for legality before forming a select from loads.
Sorry for the lack of a test case.  I tried writing one for i386 as i know selects are illegal on this target, but they are actually considered legal by isel and expanded later.

I can't see any targets to trigger this, but checking for the legality of a node before forming it is general goodness.

llvm-svn: 174934
2013-02-12 03:14:50 +00:00
Arnold Schwaighofer
b7dd0ff204 ARM cost model: Add vector reverse shuffle costs
A reverse shuffle is lowered to a vrev and possibly a vext instruction (quad
word).

radar://13171406

llvm-svn: 174933
2013-02-12 02:40:39 +00:00
Arnold Schwaighofer
fafd6a4d28 Cost model: Add check for reverse shuffles to CostModel analysis
Check for reverse shuffles in the CostModel analysis pass and query
TargetTransform info accordingly. This allows us we can write test cases for
reverse shuffles.

radar://13171406

llvm-svn: 174932
2013-02-12 02:40:37 +00:00
Arnold Schwaighofer
1ecca5fd68 ARM NEON: Handle v16i8 and v8i16 reverse shuffles
Lower reverse shuffles to a vrev64 and a vext instruction instead of the default
legalization of storing and loading to the stack. This is important because we
generate reverse shuffles in the loop vectorizer when we reverse store to an
array.

  uint8_t Arr[N];
  for (i = 0; i < N; ++i)
    Arr[N - i - 1] = ...

radar://13171760

llvm-svn: 174929
2013-02-12 01:58:32 +00:00
Chad Rosier
0422258982 Update error message due to previous commit, r174926.
llvm-svn: 174927
2013-02-12 01:12:24 +00:00
Chad Rosier
eb4399962e [ms-inline asm] Add support for lexing hexidecimal integers with a [hH] suffix.
Part of rdar://12470373

llvm-svn: 174926
2013-02-12 01:00:01 +00:00
David Blaikie
ec946c1606 DIBuilder: make the return type of createBasicType more specific
llvm-svn: 174924
2013-02-12 00:40:41 +00:00
Kay Tiong Khoo
d299c572f3 Added 0x0D to 2-byte opcode extension table for prefetch* variants
Fixed decode of existing 3dNow prefetchw instruction
Intel is scheduled to add a compatible prefetchw (same encoding) to future CPUs

llvm-svn: 174920
2013-02-12 00:19:12 +00:00
Hal Finkel
5e637e4e5d BBVectorize: Don't over-search when building the dependency map
When building the pairable-instruction dependency map, don't search
past the last pairable instruction. For large blocks that have been
divided into multiple instruction groups, searching past the last
instruction in each group is very wasteful. This gives a 32% speedup
on the csa.ll test case from PR15222 (when using 50 instructions
in each group).

No functionality change intended.

llvm-svn: 174915
2013-02-11 23:02:17 +00:00
Hal Finkel
b67d7ef969 BBVectorize: Omit unnecessary entries in PairableInstUsers
This map is queried only for instructions in pairs of pairable
instructions; so make sure that only pairs of pairable
instructions are added to the map. This gives a 3.5% speedup
on the csa.ll test case from PR15222.

No functionality change intended.

llvm-svn: 174914
2013-02-11 23:02:09 +00:00
Akira Hatanaka
10788fa4a6 [mips] Expand pseudo instructions before they are emitted in
MipsCodeEmitter.cpp.

JALR and NOP are expanded by function emitPseudoExpansionLowering, which is not
called when the old JIT is used.

This fixes the following tests which have been failing on
llvm-mips-linux builder:

LLVM :: ExecutionEngine__2003-01-04-LoopTest.ll
LLVM :: ExecutionEngine__2003-05-06-LivenessClobber.ll
LLVM :: ExecutionEngine__2003-06-04-bzip2-bug.ll
LLVM :: ExecutionEngine__2005-12-02-TailCallBug.ll
LLVM :: ExecutionEngine__2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
LLVM :: ExecutionEngine__hello2.ll
LLVM :: ExecutionEngine__stubs.ll
LLVM :: ExecutionEngine__test-branch.ll
LLVM :: ExecutionEngine__test-call.ll
LLVM :: ExecutionEngine__test-common-symbols.ll
LLVM :: ExecutionEngine__test-loadstore.ll
LLVM :: ExecutionEngine__test-loop.ll

llvm-svn: 174912
2013-02-11 22:35:40 +00:00
Bill Wendling
b1b156b0e8 Rename AttributeSets to AttributeGroups so that it's more meaningful.
llvm-svn: 174911
2013-02-11 22:33:26 +00:00
Bill Wendling
0b59566dee Use a std::map so that we record the group ID.
llvm-svn: 174910
2013-02-11 22:32:29 +00:00
Akira Hatanaka
23e95ae884 [mips] Fix indentation.
llvm-svn: 174907
2013-02-11 22:03:52 +00:00
Michael Ilseman
61bd4eabc9 Optimization: bitcast (<1 x ...> insertelement ..., X, ...) to ... ==> bitcast X to ...
llvm-svn: 174905
2013-02-11 21:41:44 +00:00
Krzysztof Parzyszek
272abb00e0 Extend Hexagon hardware loop generation to handle various additional cases:
- variety of compare instructions,
- loops with no preheader,
- arbitrary lower and upper bounds.

llvm-svn: 174904
2013-02-11 21:37:55 +00:00
Krzysztof Parzyszek
b814fd5e20 Implement HexagonInstrInfo::analyzeCompare.
llvm-svn: 174901
2013-02-11 20:04:29 +00:00
Kay Tiong Khoo
09400e6c4a *fixed disassembly of some i386 system insts with intel syntax
*added file for test cases for i386 intel syntax

llvm-svn: 174900
2013-02-11 19:46:36 +00:00
Hal Finkel
2e8c1799a0 BBVectorize: Eliminate one more restricted linear search
This eliminates one more linear search over a range of
std::multimap entries. This gives a 22% speedup on the
csa.ll test case from PR15222.

No functionality change intended.

llvm-svn: 174893
2013-02-11 17:19:34 +00:00
Michel Danzer
14d128a6ef R600/SI: Use V_ADD_F32 instead of V_MOV_B32 for clamp/neg/abs modifiers.
The modifiers don't seem to have any effect with V_MOV_B32, supposedly it's
meant to just move bits untouched.

Fixes 46 piglit tests with radeonsi, though unfortunately 11 of those had
just regressed because they started using the clamp modifier.

NOTE: This is a candidate for the Mesa stable branch.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174890
2013-02-11 15:58:21 +00:00
Kostya Serebryany
c24d624c92 [asan] added a flag -mllvm asan-short-64bit-mapping-offset=1 (0 by default)
This flag makes asan use a small (<2G) offset for 64-bit asan shadow mapping.
On x86_64 this saves us a register, thus achieving ~2/3 of the
zero-base-offset's benefits in both performance and code size.

Thanks Jakub Jelinek for the idea.

llvm-svn: 174886
2013-02-11 14:36:01 +00:00
Tim Northover
f2c4616277 AArch64: fix build on some MSVC versions
This does two things:

It removes a call to abs() which may have "long long" parameter on Windows,
which is not necessarily available in C++03.

It also corrects the signedness of Amount, which was relying on
implementation-defined conversions previously.

Code was already tested (albeit in an implemnetation defined way) so no extra
tests.

llvm-svn: 174885
2013-02-11 14:25:52 +00:00
Tim Northover
17c416da1f AArch64: Simplify logic in deciding whether bfi is valid
Previous code had a confusing comment which was mostly an implementation
detail. This condition corresponds to "lsb up to register width" and "width not
ridiculous".

llvm-svn: 174877
2013-02-11 12:32:18 +00:00
Tim Northover
349160133e Make use of DiagnosticType to provide better AArch64 diagnostics.
This gives a DiagnosticType to all AsmOperands in sight. This replaces all
"invalid operand" diagnostics with something more specific. The messages given
should still be sufficiently vague that they're not usually actively misleading
when LLVM guesses your instruction incorrectly.

llvm-svn: 174871
2013-02-11 09:29:37 +00:00
Cameron Zwarich
9b38749e29 Add support for updating LiveIntervals to MachineBasicBlock::SplitCriticalEdge().
This is currently a bit hairier than it needs to be, since depending on where the
split block resides the end ListEntry of the split block may be the end ListEntry
of the original block or a new entry. Some changes to the SlotIndexes updating
should make it possible to eliminate the two cases here.

This also isn't as optimized as it could be. In the future Liveinterval should
probably get a flag that indicates whether the LiveInterval is within a single
basic block. We could ignore all such intervals when splitting an edge.

llvm-svn: 174870
2013-02-11 09:24:47 +00:00