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

75833 Commits

Author SHA1 Message Date
Benjamin Kramer
a2833ff7e0 DWARF: Put all the pieces we have together and provide a single accessor to DIContext that provides line information when given an address.
llvm-svn: 139836
2011-09-15 20:43:22 +00:00
Benjamin Kramer
5307d9c91a DWARF: Remove accessors that parse the whole line table section in one go, this can't possibly work.
The address size is specified by the compile unit associated with a line table, there is no global address size.

llvm-svn: 139835
2011-09-15 20:43:18 +00:00
Jim Grosbach
267610ed2a Thumb2 assembly parsing and encoding for RRX.
llvm-svn: 139831
2011-09-15 19:52:43 +00:00
Jim Grosbach
ee202d43fe Thumb2 assembly parsing and encoding for ROR.
llvm-svn: 139830
2011-09-15 19:50:04 +00:00
Jim Grosbach
50ee930e9a Thumb2 assembly parsing and encoding for REV16/REVSH.
llvm-svn: 139828
2011-09-15 19:46:13 +00:00
Owen Anderson
5514958222 The the MC disassembler C API to print in verbose mode. Perhaps there should be a parameter to request verbose mode?
llvm-svn: 139821
2011-09-15 18:37:20 +00:00
Owen Anderson
84d4e5d0e2 Add support for stored annotations to MCInst, and provide facilities for MC-based InstPrinters to print them out. Enhance the ARM and X86 InstPrinter's to do so in verbose mode.
llvm-svn: 139820
2011-09-15 18:36:29 +00:00
Jakob Stoklund Olesen
b36a98d18f VirtRegMap is counting spill slots, not register spills.
Fix the stats counters to reflect that.

llvm-svn: 139819
2011-09-15 18:31:13 +00:00
Bruno Cardoso Lopes
8e702bba63 Change all checks regarding the presence of any SSE level to always
take into consideration the presence of AVX. This change, together with
the SSEDomainFix enabled for AVX, makes AVX codegen to always (hopefully)
emit the same code as SSE for 128-bit vector ops. I don't
have a testcase for this, but AVX now beats SSE in performance for
128-bit ops in the majority of programas in the llvm testsuite

llvm-svn: 139817
2011-09-15 18:27:36 +00:00
Bruno Cardoso Lopes
0fa8b71a55 Enable SSEDomainFix pass for AVX mode.
llvm-svn: 139816
2011-09-15 18:27:32 +00:00
Jakob Stoklund Olesen
74cb8c037a Count correctly when a COPY turns into a spill or reload.
The number of spills could go negative since a folded COPY is just a
spill, and it may be eliminated.

llvm-svn: 139815
2011-09-15 18:22:52 +00:00
Jim Grosbach
9d7aa9bcbc Thumb2 assembly parsing and encoding for REV.
llvm-svn: 139813
2011-09-15 18:13:30 +00:00
Jim Grosbach
7c1422b068 Thumb2 assembly parsing and encoding for RBIT.
llvm-svn: 139811
2011-09-15 18:07:14 +00:00
Jim Grosbach
d6993cb54c Thumb2 assembly parsing and encoding for signed saturating arithmetic insns.
llvm-svn: 139810
2011-09-15 18:06:15 +00:00
Benjamin Kramer
1adbd30351 DWARF: Print line tables per compile unit, so they get the right address size.
llvm-svn: 139808
2011-09-15 18:02:20 +00:00
Jim Grosbach
e341895736 Assmebler symbol attribute directives don't work on temporary symbols.
Assembler private local symbols aren't legal targets of symbol attributes,
so issue a diagnostic for them.

Based on patch by Stepan Dyatkovskiy.

llvm-svn: 139807
2011-09-15 17:56:49 +00:00
Jakob Stoklund Olesen
444ae3ddc7 Count inserted spills and reloads more accurately.
Adjust counters when removing spill and reload instructions.

We still don't account for reloads being removed by eliminateDeadDefs().

llvm-svn: 139806
2011-09-15 17:54:28 +00:00
Benjamin Kramer
900209189c DWARF: wire up .debug_str dumping.
llvm-svn: 139799
2011-09-15 16:57:13 +00:00
Jim Grosbach
00e28bee78 Handle missing newline at EOF more gracefully in MC AsmLexer.
If we see an EOF w/o a preceding end-of-line, return an EndOfStatement
token before returning the Eof token.

Based on patch by Stepan Dyatkovskiy.

llvm-svn: 139798
2011-09-15 16:52:06 +00:00
Jakob Stoklund Olesen
f608389173 Trace through sibling PHIs in bulk.
When traceSiblingValue() encounters a PHI-def value created by live
range splitting, don't look at all the predecessor blocks.  That can be
very expensive in a complicated CFG.

Instead, consider that all the non-PHI defs jointly dominate all the
PHI-defs.  Tracing directly to all the non-PHI defs is much faster that
zipping around in the CFG when there are many PHIs with many
predecessors.

This significantly improves compile time for indirectbr interpreters.

llvm-svn: 139797
2011-09-15 16:41:12 +00:00
Jim Grosbach
69ddec5ff7 ARM support the pre-UAL mnemonic 'qsubaddx' for 'qsax.'
llvm-svn: 139796
2011-09-15 16:16:50 +00:00
Jim Grosbach
5742cbd63f Re-order test.
llvm-svn: 139795
2011-09-15 16:04:13 +00:00
Jim Grosbach
d428c970e3 Thumb2 push/pop mnemonic recognition.
llvm-svn: 139794
2011-09-15 15:55:04 +00:00
Jakob Stoklund Olesen
93195a175c Use getPrevSlot() instead of getPrevIndex().
The getPrevIndex() function moves to the same slot in the previous
instruction.  For getVNInfoBefore(), we just need the previous slot in
the same instruction.

llvm-svn: 139793
2011-09-15 15:31:49 +00:00
Jakob Stoklund Olesen
1c42989edf Speed up LiveIntervals::shrinkToUse with some caching.
Blocks with multiple PHI successors only need to go on the worklist
once.  Use a SmallPtrSet to track the live-out blocks that have already
been handled.  This is a lot faster than the two live range check we
would otherwise do.

Also stop recomputing hasPHIKill flags.  Like RenumberValues(), it is
conservatively correct to leave them in, and they are not used for
anything important.

llvm-svn: 139792
2011-09-15 15:24:16 +00:00
Jakob Stoklund Olesen
08e2c3836e Revert r139782, "RemoveCopyByCommutingDef doesn't need hasPHIKill()."
It does, after all.

RemoveCopyByCommutingDef rewrites the uses of one particular value
number in A. It doesn't know how to rewrite phi uses, so there can't be
any.

llvm-svn: 139787
2011-09-15 06:27:32 +00:00
Benjamin Kramer
346abfde05 DWARF: Make DIE printing more bulletproof.
llvm-svn: 139786
2011-09-15 05:43:00 +00:00
Nick Lewycky
e83d55a4d2 Despite what the GCC wiki says, a quick search shows that
DW_AT_GNU_template_name = 0x2110, not 0x2108. That would explain those 
attr #0x2110 under the DW_TAG_GNU_template_template_param I'm seeing. Migrate
from documented values to reality.

llvm-svn: 139785
2011-09-15 05:30:55 +00:00
Nick Lewycky
d984768671 Add some more DWARF extensions from:
1. http://gcc.gnu.org/wiki/TemplateParmsDwarf
2. ftp://ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf

llvm-svn: 139784
2011-09-15 05:21:03 +00:00
Jakob Stoklund Olesen
83f23f23cd Stop verifying hasPHIKill() flags.
There is only one legitimate use remaining, in addIntervalsForSpills().
All other calls to hasPHIKill() are only used to update PHIKill flags.

The addIntervalsForSpills() function is part of the old spilling
framework, only used by linearscan.

llvm-svn: 139783
2011-09-15 05:16:30 +00:00
Jakob Stoklund Olesen
f6c29ab2d4 RemoveCopyByCommutingDef doesn't need hasPHIKill().
Instead, let HasOtherReachingDefs() test for defs in B that overlap any
phi-defs in A as well.  This test is slightly different, but almost
identical.

A perfectly precise test would only check those phi-defs in A that are
reachable from AValNo.

llvm-svn: 139782
2011-09-15 05:03:50 +00:00
Jakob Stoklund Olesen
2c232210b1 It is safe to remat a value killed by phis.
The source live range is recomputed using shrinkToUses() which does
handle phis correctly.  The hasPHIKill() condition was relevant in the
old days when ReMaterializeTrivialDef() tried to recompute the live
range itself.

The shrinkToUses() function will mark the original def as dead when no
more uses and phi kills remain.  It is then removed by
runOnMachineFunction().

llvm-svn: 139781
2011-09-15 04:52:06 +00:00
Jakob Stoklund Olesen
a7631a56b4 Leave hasPHIKill flags alone in LiveInterval::RenumberValues.
It is conservatively correct to keep the hasPHIKill flags, even after
deleting PHI-defs.

The calculation can be very expensive after taildup has created a
quadratic number of indirectbr edges in the CFG, and the hasPHIKill flag
isn't used for anything after RenumberValues().

llvm-svn: 139780
2011-09-15 04:37:18 +00:00
Nick Lewycky
c76a2c21bc Update Dwarf enums list for DWARF 4.
Note that DW_TAG_rvalue_reference_type is officially 0x42, not 0x41.

llvm-svn: 139779
2011-09-15 04:23:44 +00:00
Benjamin Kramer
2b93dac69c DWARF: Print the number for unknown abbrev fields.
Thanks Nick!

llvm-svn: 139778
2011-09-15 04:15:59 +00:00
Benjamin Kramer
2dd05a53d3 DWARF: Fail gracefully when encountering unknown values in an abbrev.
llvm-svn: 139777
2011-09-15 04:00:58 +00:00
Nick Lewycky
4b85977895 Give structs with virtual methods a virtual destructor.
llvm-svn: 139776
2011-09-15 03:41:51 +00:00
Benjamin Kramer
8f332f8767 DWARF: Silence GCC -Wsign-compare warning.
llvm-svn: 139775
2011-09-15 03:20:04 +00:00
Benjamin Kramer
551244d899 DWARF: Fix indentation.
llvm-svn: 139774
2011-09-15 03:11:09 +00:00
Benjamin Kramer
8013b8f7e0 DWARF: Include <algorithm> explicitly.
llvm-svn: 139773
2011-09-15 02:19:33 +00:00
Benjamin Kramer
ceca872d69 DWARF: Add basic support for line tables.
The llvm-dwarfdump output isn't very verbose yet.

llvm-svn: 139771
2011-09-15 02:12:05 +00:00
Eli Friedman
2109f34467 Make demanded-elt simplification for shufflevector slightly stronger. Spotted by inspection.
llvm-svn: 139768
2011-09-15 01:14:29 +00:00
Andrew Trick
e5bb7267ff [regcoalescing] bug fix for RegistersDefinedFromSameValue.
An improper SlotIndex->VNInfo lookup was leading to unsafe copy removal.
Fixes PR10920 401.bzip2 miscompile with no IV rewrite.

llvm-svn: 139765
2011-09-15 01:09:33 +00:00
Eli Friedman
7cb90dcbce Fix the code creating VZEXT_LOAD so that it creates the right memoperand. Issue spotted in -debug output. I can't think of any practical effects at the moment, but it might matter if we start doing more aggressive alias analysis in CodeGen.
llvm-svn: 139758
2011-09-14 23:42:45 +00:00
Jim Grosbach
68de69f1c9 Thumb2 assembly parsing and encoding for PLI.
llvm-svn: 139757
2011-09-14 23:29:05 +00:00
Jim Grosbach
4d7b859fab Thumb2 assembly parsing and encoding for PLD.
llvm-svn: 139756
2011-09-14 23:26:12 +00:00
Douglas Gregor
66d5bb28aa Update the comment for system_temp_directory() to indicate when it
will ignore the erasedOnReboot option, and properly escape the
backslash in "C:\TEMP". Thanks to Aaron and Francois.

llvm-svn: 139755
2011-09-14 23:21:47 +00:00
Jim Grosbach
669e269758 Thumb2 assembly parsing and encoding for PKH.
llvm-svn: 139754
2011-09-14 23:16:41 +00:00
Jim Grosbach
c1475b0f3f ARMv7a has the PKH instructions.
llvm-svn: 139753
2011-09-14 23:16:34 +00:00
Devang Patel
e5dc3a1f1e Add support to emit debug info for C++0x nullptr type.
llvm-svn: 139751
2011-09-14 23:13:28 +00:00