Commit Graph

17731 Commits

Author SHA1 Message Date
David Blaikie
b4cf0ab22b Split out filename & directory from DIFile to start generalizing over DIScopes
This is the first step to making all DIScopes have a common metadata prefix (so
that things (using directives, for example) that can appear in any scope can be
added to that common prefix). DIFile is itself a DIScope so the common prefix
of all DIScopes cannot be a DIFile - instead it's the raw filename/directory
name pair.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177239 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-17 21:13:55 +00:00
David Blaikie
dad145562f Improve DIFile debug info annotation by letting it fallback to DIScope
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177236 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-17 20:28:12 +00:00
Jakob Stoklund Olesen
64110ffc9e Add SchedRW as an Instruction field.
Don't require instructions to inherit Sched<...>. Sometimes it is more
convenient to say:

  let SchedRW = ... in {
    ...
  }

Which is now possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177199 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-15 22:51:13 +00:00
Daniel Dunbar
dfe91cefd2 [ADT] Fix StringSet::insert() to not allocate on every lookup.
- The previous implementation always constructed the StringMap entry, even if
   the key was present in the set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177178 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-15 20:16:59 +00:00
Craig Topper
d455d4f457 Use NumBaseBits in a few more places in SmallBitVector instead of recalculating it. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177142 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-15 06:01:42 +00:00
Eric Christopher
a286fc065a Silence anonymous type in anonymous union warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177135 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-15 00:42:55 +00:00
Reed Kotler
f8b0a08b6a Add a new method which enables one to change register classes.
See the Mips16ISetLowering.cpp patch to see a use of this.
For now now the extra code in Mips16ISetLowering.cpp is a nop but is
used for test purposes. Mips32 registers are setup and then removed and
then the Mips16 registers are setup. 

Normally you need to add register classes and then call
computeRegisterProperties.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177120 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 22:02:09 +00:00
Andrew Trick
1754aca83a MachineModel: Add a ProcResGroup class.
This allows abitrary groups of processor resources. Using something in
a subset automatically counts againts the superset. Currently, this
only works if the superset is also a ProcResGroup as opposed to a
SuperUnit.

This allows SandyBridge to be expressed naturally, which will be
checked in shortly.

def SBPort01 : ProcResGroup<[SBPort0, SBPort1]>;
def SBPort15 : ProcResGroup<[SBPort1, SBPort5]>;
def SBPort23  : ProcResGroup<[SBPort2, SBPort3]>;
def SBPort015 : ProcResGroup<[SBPort0, SBPort1, SBPort5]>;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177112 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 21:21:50 +00:00
Hal Finkel
0cc52c67db Move estimateStackSize from ARM into MachineFrameInfo
This is a generic function (derived from PEI); moving it into
MachineFrameInfo eliminates a current redundancy between the ARM and AArch64
backends, and will allow it to be used by the PowerPC target code.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177111 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 21:15:20 +00:00
Hal Finkel
3080d23fde Provide the register scavenger to processFunctionBeforeFrameFinalized
Add the current PEI register scavenger as a parameter to the
processFunctionBeforeFrameFinalized callback.

This change is necessary in order to allow the PowerPC target code to
set the register scavenger frame index after the save-area offset
adjustments performed by processFunctionBeforeFrameFinalized. Only
after these adjustments have been made is it possible to estimate
the size of the stack frame.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177108 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 20:33:40 +00:00
Alexey Samsonov
b4ba5e68e1 [ASan] emit instrumentation for initialization order checking by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177063 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 12:38:58 +00:00
Joerg Sonnenberger
4bf030402d Add two of the float related ARM-specific entries for e_flags needed for
linkers to interact with GNU ld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177016 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 08:01:36 +00:00
Nick Lewycky
a204ef3168 Refactor GCOV's six constructor arguments into a struct with a getter that
constructs default arguments. It can now take default arguments from
cl::opt'ions. Add a new -default-gcov-version=... option, and actually test it!

Sink the reverse-order of the version into GCOVProfiling, hiding it from our
users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177002 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 05:13:26 +00:00
Nick Lewycky
c14f1c4587 Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 01:26:17 +00:00
Michael J. Spencer
cc3a595ab9 [Support] Fix lifetime of file descriptors when using MemoryBuffer.
Clients of MemoryBuffer::getOpenFile expect it not to take ownership of the file
descriptor passed in. So don't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176995 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14 00:20:10 +00:00
David Blaikie
22063d60ab Simplify file/directory name handling in DILexicalBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176993 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-13 22:52:59 +00:00
Bill Wendling
4cb1f5f406 Reset some of the target options which affect code generation.
This doesn't reset all of the target options within the TargetOptions
object. This is because some of those are ABI-specific and must be determined if
it's okay to change those on the fly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176986 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-13 22:26:59 +00:00
David Blaikie
33905b2a34 Simplify directory name handling in DILexicalBlockFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176984 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-13 22:23:51 +00:00
Reed Kotler
9106f73246 Add some additonal attribute helper functions. Test will be on follow
up putback to clang for mips16.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176968 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-13 20:20:08 +00:00
David Blaikie
de3077ae6b Refactor filename/directory in DICompileUnit into a DIFile
This is the next step towards making the metadata for DIScopes have a common
prefix rather than having to delegate based on their tag type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176913 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-13 00:01:35 +00:00
David Blaikie
46561ce249 Remove unused "isMain" field from DICompileUnit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176910 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 22:43:04 +00:00
Manman Ren
9e999adb48 Debug Info: use SmallVector instead of std::vector in MCDwarfDirsCUMap and MCDwarfFilesCUMap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176893 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 20:17:00 +00:00
Pete Cooper
8f8af529fc Add a doFinalization method to the DataLayout pass.
This pass is meant to be immutable, however it holds mutable state to cache StructLayouts.
This method will allow the pass manager to clear the mutable state between runs.

Note that unfortunately it is still necessary to have the destructor, even though it does the
same thing as doFinalization.  This is because most TargetMachines embed a DataLayout on which
doFinalization isn't run as its never added to the pass manager.

I also didn't think it was necessary to complication things with a deInit method for which
doFinalization and ~DataLayout both call as there's only one field of mutable state.  If we had
more fields to finalize i'd have added this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176877 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 17:37:31 +00:00
David Blaikie
c0ec8a4f4d Remove support for versioned debug info.
Versioned debug info support has been a burden to maintain & also compromised
current debug info verification by causing test cases testing old debug info to
remain rather than being updated to the latest. It also makes it hard to add or
change the metadata schema by requiring various backwards-compatibility in the
DI* hierarchy.

So it's being removed in preparation for new changes to the schema to tidy up
old/unnecessary fields and add new fields needed for new debug info (well, new
to LLVM at least).

The more surprising part of this is the changes to DI*::Verify - this became
necessary due to the changes to AsmWriter. AsmWriter was relying on the version
test to decide which bits of metadata were actually debug info when printing
the comment annotations. Without the version information the tag numbers were
too common & it would print debug info on random metadata that happened to
start with an integer that matched a tag number. Instead this change makes the
Verify functions more precise (just adding "number of operands" checks - not
type checking those operands yet) & relies on that to decide which metadata is
debug info metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176838 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 23:39:23 +00:00
Eli Bendersky
6acbcd423b Residual cleanup: live-out set is gone
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176836 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 23:18:25 +00:00
Nick Lewycky
0ebc084132 Use LLVMBool instead of 'bool' in the C API. Based on a patch by Peter Zotov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176793 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 21:58:22 +00:00
Jakub Staszak
760fa5dc80 Cleanup #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176787 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 13:11:23 +00:00
Jakub Staszak
03bf8fd288 Remove unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176785 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 01:15:14 +00:00
Jakub Staszak
35d00e55dc Add some constantness in MachinePostDominators.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176784 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 01:14:42 +00:00
Jakub Staszak
ec3bb4b660 Remove unneeded #includes. Use forward declarations instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176783 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 00:34:01 +00:00
Jakub Staszak
e939a066c8 Remove unneeded #includes. Use forward declarations instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176782 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 00:20:16 +00:00
Jakub Staszak
d683edc711 Remove unneeded cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176776 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 19:34:14 +00:00
Jakub Staszak
64bf55af6f Remove unneeded const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176771 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 18:24:26 +00:00
Jakub Staszak
209cb5b56b Use forward declaration instead of #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176770 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 18:05:34 +00:00
Jan Wen Voung
fa785cb22d Disable statistics on Release builds and move tests that depend on -stats.
Summary:
Statistics are still available in Release+Asserts (any +Asserts builds),
and stats can also be turned on with LLVM_ENABLE_STATS.

Move some of the FastISel stats that were moved under DEBUG()
back out of DEBUG(), since stats are disabled across the board now.

Many tests depend on grepping "-stats" output.  Move those into
a orig_dir/Stats/. so that they can be marked as unsupported
when building without statistics.

Differential Revision: http://llvm-reviews.chandlerc.com/D486

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176733 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 22:56:31 +00:00
Eli Bendersky
d25c05efd5 Clean up out-of-date comments and some stray whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176729 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 22:29:44 +00:00
Jakob Stoklund Olesen
768ed8b8c3 No really, don't use end().
Clearly, this function is never actually called with the last
instruction in the function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176708 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 18:36:36 +00:00
David Blaikie
423de3f047 Remove -print-dbginfo as it is unused & bitrotten.
This pass hasn't been touched in two years & would fail with assertions against
the current debug info metadata format (the only test case for it still uses a
many-versions old debug info metadata format)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176707 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 18:17:46 +00:00
Jakob Stoklund Olesen
e77b6ceb02 Avoid creating a SlotIndex from the end() iterator.
No test case, spotted by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176705 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 18:08:54 +00:00
Jakob Stoklund Olesen
6ffcd5efe1 Rename isEarlierInSameTrace to isUsefulDominator.
In very rare cases caused by irreducible control flow, the dominating
block can have the same trace head without actually being part of the
trace.

As long as such a dominator still has valid instruction depths, it is OK
to use it for computing instruction depths.

Rename the function to avoid lying, and add a check that instruction
depths are computed for the dominator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176668 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 23:55:49 +00:00
Benjamin Kramer
87d212095f Fix tautological compare. Not sure why this didn't trigger any test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176652 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 20:56:18 +00:00
Benjamin Kramer
3853f74aba ArrayRefize some code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176648 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 20:33:29 +00:00
Jakub Staszak
4a521da51a Change Index type from unsigned long to unsigned. This should fix PR14980.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176645 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 20:21:27 +00:00
Jakub Staszak
4b7e609548 Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176643 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 20:04:17 +00:00
Nick Lewycky
d9686a98b8 Switch from a version 4.2/4.4 switch to a four-byte version string to be put
into the actual gcov file.

Instead of using the bottom 4 bytes as the function identifier, use a counter.
This makes the identifier numbers stable across multiple runs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176616 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 08:28:49 +00:00
Manman Ren
3de61b4c01 Debug Info: store the files and directories for each compile unit.
We now emit a line table for each compile unit. To reduce the prologue size
of each line table, the files and directories used by each compile unit are
stored in std::map<unsigned, std::vector< > > instead of std::vector< >.

The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each
compile unit causes a huge increase of debug info. With this patch, each
prologue will only emit the files required by the compile unit.

rdar://problem/13342023


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176605 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 01:42:00 +00:00
Andrew Trick
76c25dc2bf Generalize my previous fix for -print-options.
Always print options that differ from their implicit default. At least
for simple option types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176572 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 19:04:56 +00:00
Shuxin Yang
985dac6579 Memory Dependence Analysis (not mem-dep test) take advantage of "invariant.load" metadata.
The "invariant.load" metadata indicates the memory unit being accessed is immutable.
A load annotated with this metadata can be moved across any store.

As I am not sure if it is legal to move such loads across barrier/fence, this
change dose not allow such transformation.

rdar://11311484

Thank Arnold for code review.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176562 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 17:48:48 +00:00
Jakub Staszak
62c102360a Remove duplicated forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 00:04:32 +00:00
Jakub Staszak
f84606732c Fix a few typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176519 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-05 22:05:16 +00:00