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

17717 Commits

Author SHA1 Message Date
David Blaikie
620d0ae359 Reorder the DIFile field in DILexicalBlock to become a prefix common with other DIScopes
llvm-svn: 177703
2013-03-22 05:47:44 +00:00
Argyrios Kyrtzidis
1158d6e6fc Introduce LLVM_STATIC_ASSERT macro, which expands to C/C++'s static_assert on compilers which support it.
llvm-svn: 177699
2013-03-22 03:10:51 +00:00
Chandler Carruth
e849175ffc Revert r177543: Add timing of the IR parsing code with a new
-time-ir-parsing flag

This breaks the layering of the Support library. We can't add an
implementation side to IRReader because it refers directly to entities
only accessible as part of the IR, AsmParser, and BitcodeReader
libraries. It can only be used in a context where all of those libraries
will be available.

We'll need to find some other way to get this functionality, and
hopefully solve the long-standing layering problem of IRReader.h...

llvm-svn: 177695
2013-03-22 02:20:34 +00:00
David Blaikie
c9d598113b Refactor the filename/directory information in DISubprogram to refer directly to the pair rather than the DIFile.
llvm-svn: 177677
2013-03-21 23:08:34 +00:00
Bill Wendling
05a454cd6d Add a query to tell if a landing pad has a catch-all.
llvm-svn: 177675
2013-03-21 23:01:03 +00:00
David Blaikie
648a81f32c Move the DIFile in DISubprogram to the beginning to be a common prefix along with other DIScopes
llvm-svn: 177674
2013-03-21 22:29:36 +00:00
David Blaikie
67c9dc82dc Remove unused field in DISubprogram
llvm-svn: 177661
2013-03-21 20:28:52 +00:00
Chandler Carruth
8613f86d1c Hoist the definition of getTypeSizeInBits to be inlinable and in the
header.

This method is called in the hot path for *many* passes, SROA is what
caught my interest. A common pattern is that which branch of the switch
should be taken is known in the callsite and so it is a very good
candidate for inlining and simplification. Moving it into the header
allows the optimizer to fold a lot of boring, repeatitive code in
callers of this routine.

I'm seeing pretty significant speedups in parts of SROA and I suspect
other passes will see similar speedups if they end up working with type
sizes frequently. I've not seen any significant growth of the binaries
as a consequence, but let me know if you see anything suspicious here.

llvm-svn: 177632
2013-03-21 09:52:22 +00:00
David Blaikie
162c31d46b Removing unused DISubprogram::getFile
llvm-svn: 177614
2013-03-21 00:10:31 +00:00
David Blaikie
b2d35852ea Debug info: refactor the first field of DICompileUnit to be a raw file/directory pair
This removes the DICompileUnit special case from DIScope.

llvm-svn: 177610
2013-03-20 23:58:12 +00:00
Jakub Staszak
9d539599f4 Use pre-inc, pre-dec when possible.
They are generally faster (at least not slower) than post-inc, post-dec.

llvm-svn: 177608
2013-03-20 23:56:19 +00:00
David Blaikie
78d3bdea74 Debug Info: Swap the 2nd and 3rd parameters to DICompileUnit to match the common DIScope prefix
llvm-svn: 177595
2013-03-20 22:52:54 +00:00
David Blaikie
30abbc718f Remove unused field in DICompileUnit
llvm-svn: 177590
2013-03-20 22:34:33 +00:00
Rafael Espindola
a42d62f05f Add std prefixes to fix the build with xlc.
Patch by Kai <kai@redstar.de>.

llvm-svn: 177574
2013-03-20 21:00:22 +00:00
Jakob Stoklund Olesen
5e8ed26fe2 Make sure TableGen exits with an error code after printing errors.
This makes it possible to report multiple errors in one invocation.
There are already calls to PrintError in CodeGenDAGPatterns.cpp which
previously would not cause TableGen to fail.

<rdar://problem/13463339>

llvm-svn: 177573
2013-03-20 20:43:11 +00:00
David Blaikie
6ddc4bafc5 Refactor file/directory path in namespace debug info to refer directly to the pair rather than the DIFile
(paired to a Clang test - excuse the buildbot skew/fallout)

llvm-svn: 177566
2013-03-20 19:39:15 +00:00
Eric Christopher
576627d80c Remove blank line before block comment.
llvm-svn: 177550
2013-03-20 18:25:12 +00:00
David Blaikie
6089c97e3f DIBuilder: allow linkage name to be specified for global variables
Patch by Kai Nacke (kai@redstar.de)

llvm-svn: 177547
2013-03-20 17:49:48 +00:00
Eli Bendersky
adeb9c26d8 Add timing of the IR parsing code with a new -time-ir-parsing flag
llvm-svn: 177543
2013-03-20 17:00:25 +00:00
David Blaikie
2a48d29317 Reorder the DIFile parameter in DINameSpace
Moving the DIFile parameter to immediately proceed the tag so that it will be a
common prefix with other DIScopes (once the DIFile is replaced with the raw
file/directory pair).

llvm-svn: 177492
2013-03-20 06:27:06 +00:00
David Blaikie
f8be0ba302 Provide more details for DINameSpace debug info in the IR comment annotations
Sorry for the version skew - I should've committed this before the
corresponding Clang test case.

llvm-svn: 177486
2013-03-20 05:14:14 +00:00
David Blaikie
b9f490e28c Refactor the DIFile (2nd) parameter to DITypes to be an MDNode reference to a raw directory/file pair
This makes DIType's first non-tag parameter the same as DIFile's, allowing them
to both share the common implementation of getFilename/getDirectory in DIScope.

llvm-svn: 177467
2013-03-20 00:26:26 +00:00
David Blaikie
dd2f7e5b88 Move the DIFile operand to DITypes from the 4th operand to the 2nd.
This is another step along the way to making all DIScopes have a common prefix
which can be added to in a general manner to support using directives
(DW_TAG_imported_module).

llvm-svn: 177462
2013-03-19 23:25:22 +00:00
Chad Rosier
bc89a1acc9 Dead code.
llvm-svn: 177450
2013-03-19 22:12:47 +00:00
Chad Rosier
758abf9ba0 [ms-inline asm] Move the size directive asm rewrite into the target specific
logic as a QOI cleanup.
rdar://13445327

llvm-svn: 177413
2013-03-19 17:32:17 +00:00
Eli Bendersky
472ad4995c The Linker interface has some dead code after the cleanup in r172749
(and possibly others). The attached patch removes it, and tries to
update comments accordingly.

llvm-svn: 177406
2013-03-19 15:26:24 +00:00
Jakub Staszak
72d78c9d31 Move #include of BitVector from .h to .cpp file.
Also remove unneeded #include and forward declaration.

llvm-svn: 177357
2013-03-18 23:45:45 +00:00
Jakub Staszak
040b8f01e5 Add some constantness.
llvm-svn: 177356
2013-03-18 23:40:46 +00:00
Jakub Staszak
d49a75bef6 Remove unneeded #includes.
llvm-svn: 177351
2013-03-18 23:33:44 +00:00
Jakub Staszak
2fe5645a34 Make methods const.
llvm-svn: 177350
2013-03-18 23:33:14 +00:00
Jakub Staszak
29423d04fc Remove trailing spaces.
llvm-svn: 177339
2013-03-18 23:04:30 +00:00
Benjamin Kramer
bb22dec29c Remove default copy ctor/assignment, makes AttributeSet trivially copyable.
And enables SmallVector's pod optimizations.

llvm-svn: 177281
2013-03-18 12:14:30 +00:00
David Blaikie
3193e0599a 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.

llvm-svn: 177239
2013-03-17 21:13:55 +00:00
David Blaikie
7e2db48c53 Improve DIFile debug info annotation by letting it fallback to DIScope
llvm-svn: 177236
2013-03-17 20:28:12 +00:00
Jakob Stoklund Olesen
46174e4527 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.

llvm-svn: 177199
2013-03-15 22:51:13 +00:00
Daniel Dunbar
3835c43762 [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.

llvm-svn: 177178
2013-03-15 20:16:59 +00:00
Craig Topper
c3c590b1bb Use NumBaseBits in a few more places in SmallBitVector instead of recalculating it. No functional change.
llvm-svn: 177142
2013-03-15 06:01:42 +00:00
Eric Christopher
867ab49c5e Silence anonymous type in anonymous union warnings.
llvm-svn: 177135
2013-03-15 00:42:55 +00:00
Reed Kotler
6959b26da1 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.

llvm-svn: 177120
2013-03-14 22:02:09 +00:00
Andrew Trick
d133b52150 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]>;

llvm-svn: 177112
2013-03-14 21:21:50 +00:00
Hal Finkel
c0eead2c60 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.

llvm-svn: 177111
2013-03-14 21:15:20 +00:00
Hal Finkel
a2a564fb2e 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.

llvm-svn: 177108
2013-03-14 20:33:40 +00:00
Alexey Samsonov
984e7940a4 [ASan] emit instrumentation for initialization order checking by default
llvm-svn: 177063
2013-03-14 12:38:58 +00:00
Joerg Sonnenberger
9e9e742da6 Add two of the float related ARM-specific entries for e_flags needed for
linkers to interact with GNU ld.

llvm-svn: 177016
2013-03-14 08:01:36 +00:00
Nick Lewycky
d2ee2e0cd8 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.

llvm-svn: 177002
2013-03-14 05:13:26 +00:00
Nick Lewycky
110760eb4d Fix typo in comment.
llvm-svn: 176997
2013-03-14 01:26:17 +00:00
Michael J. Spencer
dc23417a6b [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.

llvm-svn: 176995
2013-03-14 00:20:10 +00:00
David Blaikie
27dd933a64 Simplify file/directory name handling in DILexicalBlock
llvm-svn: 176993
2013-03-13 22:52:59 +00:00
Bill Wendling
6dee6aa358 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.

llvm-svn: 176986
2013-03-13 22:26:59 +00:00
David Blaikie
d68a6546ce Simplify directory name handling in DILexicalBlockFile.
llvm-svn: 176984
2013-03-13 22:23:51 +00:00