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

19570 Commits

Author SHA1 Message Date
Craig Topper
cb49e6591e [C++11] Make use of 'nullptr' in TableGen library.
llvm-svn: 205830
2014-04-09 04:50:04 +00:00
Craig Topper
52173239da [C++11] Replace some comparisons with 'nullptr' with simple boolean checks to reduce verbosity.
llvm-svn: 205829
2014-04-09 04:20:00 +00:00
Diego Novillo
224c7b79fe Add support for optimization reports.
Summary:
This patch adds backend support for -Rpass=, which indicates the name
of the optimization pass that should emit remarks stating when it
made a transformation to the code.

Pass names are taken from their DEBUG_NAME definitions.

When emitting an optimization report diagnostic, the lack of debug
information causes the diagnostic to use "<unknown>:0:0" as the
location string.

This is the back end counterpart for

http://llvm-reviews.chandlerc.com/D3226

Reviewers: qcolombet

CC: llvm-commits

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

llvm-svn: 205774
2014-04-08 16:42:34 +00:00
David Majnemer
247d9155db obj2yaml: Use the correct relocation type for different machine types
The IO normalizer would essentially lump I386 and AMD64 relocations
together.  Relocation types with the same numeric value would then get
mapped in appropriately.

For example:
IMAGE_REL_AMD64_ADDR64 and IMAGE_REL_I386_DIR16 both have a numeric
value of one.  We would see IMAGE_REL_I386_DIR16 in obj2yaml conversions
of object files with a machine type of IMAGE_FILE_MACHINE_AMD64.

llvm-svn: 205746
2014-04-07 23:12:20 +00:00
Richard Smith
94ef3b81d5 Remove an unused file.
Using this file would result in an odr violation: it defines an llvm::Interval
class that conflicts with the one in Analysis/Interval.h.

llvm-svn: 205726
2014-04-07 17:17:00 +00:00
Simon Atanasyan
9b9959acdf Fix a typo in the comment.
llvm-svn: 205707
2014-04-07 12:59:36 +00:00
Craig Topper
e8f0985861 Use 'false' for a bool instead of '0'
llvm-svn: 205699
2014-04-07 06:59:39 +00:00
Craig Topper
ee78063a54 [C++11] Make use of 'nullptr' in the Support library.
llvm-svn: 205697
2014-04-07 04:17:22 +00:00
NAKAMURA Takumi
dba847d1d0 Quick fix: Triple::isOSMSVCRT() should be false for targeting cygwin.
It affected callee's stack pop in x86. It is one of devergences between cygwin and mingw since mingw-gcc-4.6.

Added testcases to llvm/test/CodeGen/X86/win32_sret.ll for cygwin.

llvm-svn: 205688
2014-04-06 10:01:23 +00:00
David Blaikie
0b46bae43e DebugInfo: Support namespace aliases as DW_TAG_imported_declaration instead of DW_TAG_imported_module
I really should read the spec more often (and test GCC more often too).
I just assumed that namespace aliases would be the same as using
directives, except with a name. But apparently that's not how the DWARF
standards suggests they be implemented. DWARF4 provides an example and
other non-normative text suggesting that namespace aliases be
implemented by named imported declarations intsead of named imported
modules.

So be it.

llvm-svn: 205685
2014-04-06 06:29:01 +00:00
Argyrios Kyrtzidis
239746d5db [Support] Modify LockFileManager::waitForUnlock() to return info about how the lock was released.
llvm-svn: 205683
2014-04-06 03:19:31 +00:00
David Blaikie
088dc80ca7 Remove unused parameter
Also update a few null pointers in this function to be consistent with
new null pointers being added.

Patch by Robert Matusewicz!

Differential Revision: http://reviews.llvm.org/D3123

llvm-svn: 205682
2014-04-05 23:33:25 +00:00
David Blaikie
3b8c0a19e7 MachineInstr: introduce explicit_operands and implicit_operands ranges
Makes iteration over implicit and explicit machine operands more
explicit (har har). Insipired by code review discussion for r205565.

llvm-svn: 205680
2014-04-05 22:42:04 +00:00
David Blaikie
8280a86519 Remove unnecessary "inline" of inline defined member functions
Member functions defined within a class definition are implicitly
'inline' for linkage purposes. Compilers might slightly favor inlining
functions explicitly marked 'inline', but LLVM doesn't make a stylistic
habit of doing this generally.

llvm-svn: 205679
2014-04-05 22:20:50 +00:00
David Blaikie
bbd3350377 Simplify compression API by compressing into a SmallVector rather than a MemoryBuffer
This is the other half of r205676.

llvm-svn: 205677
2014-04-05 21:53:04 +00:00
David Blaikie
20021670e1 Simplify compression API by decompressing into a SmallVector rather than a MemoryBuffer
This avoids an extra copy during decompression and avoids the use of
MemoryBuffer which is a weirdly esoteric device that includes unrelated
concepts like "file name" (its rather generic name is a bit misleading).

Similar refactoring of zlib::compress coming up.

llvm-svn: 205676
2014-04-05 21:26:44 +00:00
David Blaikie
cfaaa4e6b3 Remove unused function
llvm-svn: 205672
2014-04-05 20:20:46 +00:00
Matt Arsenault
7b6a70a9cf Add DAG parameter to ComputeNumSignBitsForTargetNode
This way, you can check the number of sign bits in the
operands. The depth parameter it already has is pretty useless
without this.

llvm-svn: 205649
2014-04-04 20:13:13 +00:00
Jim Grosbach
cd0c07d8c8 Tidy up naming.
llvm-svn: 205633
2014-04-04 17:36:55 +00:00
Craig Topper
694437e2ef Make consistent use of MCPhysReg instead of uint16_t throughout the tree.
llvm-svn: 205610
2014-04-04 05:16:06 +00:00
Jim Grosbach
37ea71d1c7 Fix spelling. Sigh.
llvm-svn: 205605
2014-04-04 02:14:38 +00:00
Jim Grosbach
afaa05bdd9 Add iterator_ranges for block pred/succ.
llvm-svn: 205603
2014-04-04 02:10:59 +00:00
Rafael Espindola
c4dd200975 Implement getRelocationAddress for MachO and ET_REL elf files.
With that, fix the symbolizer to work with any ELF file.

llvm-svn: 205588
2014-04-03 23:54:35 +00:00
Rafael Espindola
0ab1b9941a Remove section_rel_empty. Just compare begin() and end() instead.
llvm-svn: 205577
2014-04-03 22:42:22 +00:00
Rafael Espindola
44e832f9f7 Reuse existing variable.
llvm-svn: 205572
2014-04-03 21:48:41 +00:00
Dmitri Gribenko
2268927ed1 ArrayRef: use std::vector::data() now that we are building in C++11 mode
llvm-svn: 205542
2014-04-03 16:29:11 +00:00
Rafael Espindola
2c9ebadfdc Handle getting UnknownAddressOrSize or section_end().
These should probably be error conditions.

llvm-svn: 205509
2014-04-03 03:57:03 +00:00
Rafael Espindola
f4157b844b Implement get getSymbolFileOffset with getSymbolAddress.
This has the following advantages:
* Less code.
* The old ELF implementation was wrong for non-relocatable objects.
* The old ELF implementation (and I think MachO) was wrong for thumb.

No current testcase since this is only used from MCJIT and it only uses
relocatable objects and I don't think it supports thumb yet.

llvm-svn: 205508
2014-04-03 03:13:33 +00:00
Rafael Espindola
b4418f30c1 Remove getSymbolValue.
All existing users explicitly ask for an address or a file offset.

llvm-svn: 205503
2014-04-03 02:32:47 +00:00
Rafael Espindola
f9c7d92ebc Add support for the R_ARM_ABS32 relocation.
This should bring the arm buildbots back.

llvm-svn: 205502
2014-04-03 02:27:00 +00:00
Rafael Espindola
7752d2f349 Only clear the thumb bit from function addresses.
llvm-svn: 205500
2014-04-03 02:20:43 +00:00
Rafael Espindola
edcad2493a Simplify ELFObjectFile<ELFT>::getSymbolAddress.
In particular, we only need to fetch the section if this is a relocatable
object.

No functionality change.

llvm-svn: 205499
2014-04-03 01:51:15 +00:00
Rafael Espindola
1cc921e760 Revert "Fix a nomenclature error in llvm-nm."
This reverts commit r205479.

It turns out that nm does use addresses, it is just that every reasonable
relocatable ELF object has sections with address 0. I have no idea if those
exist in reality, but it at least it shows that llvm-nm should use the name
address.

The added test was includes an unusual .o file with non 0 section addresses. I
created it by hacking ELFObjectWriter.cpp.

Really sorry for the churn.

llvm-svn: 205493
2014-04-03 00:19:35 +00:00
Rafael Espindola
23a6de77e7 Fix a nomenclature error in llvm-nm.
What llvm-nm prints depends on the file format. On ELF for example, if the
file is relocatable, it prints offsets. If it is not, it prints addresses.
Since it doesn't really need to care what it is that it is printing, use the
generic term value.

Fix or implement getSymbolValue to keep llvm-nm working.

llvm-svn: 205479
2014-04-02 22:52:46 +00:00
Duncan P. N. Exon Smith
7f2af7c18b Revert "Reapply "LTO: add API to set strategy for -internalize""
This reverts commit r199244.

Conflicts:
	include/llvm-c/lto.h
	include/llvm/LTO/LTOCodeGenerator.h
	lib/LTO/LTOCodeGenerator.cpp

llvm-svn: 205471
2014-04-02 22:05:57 +00:00
Rafael Espindola
fc351c0ca9 Add back an assert that was lost in the ELFObjectFile.h split.
llvm-svn: 205456
2014-04-02 20:00:33 +00:00
Jim Grosbach
f349849199 Simplify resolveFrameIndex() signature.
Just pass a MachineInstr reference rather than an MBB iterator.
Creating a MachineInstr& is the first thing every implementation did
anyway.

llvm-svn: 205453
2014-04-02 19:28:18 +00:00
Adrian Prantl
cb00715df3 fix a comment to use ASCII aprostrophes.
llvm-svn: 205428
2014-04-02 15:49:37 +00:00
David Blaikie
02d09c84c9 Add inequality operator for MachineLocation.
Fixes the build I broke in r205360

llvm-svn: 205361
2014-04-01 21:54:52 +00:00
Adrian Prantl
8435a9b7b2 Add a comment about the DIDescriptor class hierarchy.
llvm-svn: 205358
2014-04-01 21:04:24 +00:00
Hal Finkel
b3f2a21eed Add some additional fields to TTI::UnrollingPreferences
In preparation for an upcoming commit implementing unrolling preferences for
x86, this adds additional fields to the UnrollingPreferences structure:

 - PartialThreshold and PartialOptSizeThreshold - Like Threshold and
   OptSizeThreshold, but used when not fully unrolling. These are necessary
   because we need different thresholds for full unrolling from those used when
   partially unrolling (the full unrolling thresholds are generally going to be
   larger).

 - MaxCount - A cap on the unrolling factor when partially unrolling. This can
   be used by a target to prevent the unrolled loop from exceeding some
   resource limit independent of the loop size (such as number of branches).

There should be no functionality change for any in-tree targets.

llvm-svn: 205347
2014-04-01 18:50:30 +00:00
Matt Arsenault
8f25a008a2 Add helpers for checking if a value is a target boolean constant.
llvm-svn: 205335
2014-04-01 18:13:22 +00:00
Tim Northover
9c3d8150ef ARM64: add intrinsic for pmull (p64 x p64 = p128) operations.
llvm-svn: 205302
2014-04-01 12:22:37 +00:00
David Blaikie
99bdb2e6c3 DebugInfo: Avoid creating unnecessary/empty line tables and remove the special case of '0' in DwarfCompileUnit::initStmtList by just always using a label difference
This moves one case of raw text checking down into the MCStreamer
interfaces in the form of a virtual function, even if we ultimately end
up consolidating on the one-or-many line tables issue one day, this is
nicer in the interim. This just generally streamlines a bunch of use
cases into a common code path.

llvm-svn: 205287
2014-04-01 08:07:52 +00:00
David Blaikie
ad8a56c803 DebugInfo: Emit relocation to debug_line section when emitting asm for asm
I don't think this is reachable by any frontend (why would you transform
asm to asm+debug info?) but it helps tidy up some of this code, avoid
the weird special case of "emit the first CU, store the label, then emit
the rest" in MCDwarfLineTable::Emit by instead having the
DWARF-for-assembly case use the same codepath as DwarfDebug.cpp, by
registering the label of the debug_line section, thus causing it to be
emitted. (with a special case in asm output to just emit the label since
asm output uses the .loc directives, etc, rather than the debug_loc
directly)

llvm-svn: 205286
2014-04-01 07:35:52 +00:00
Adrian Prantl
58133ecea4 Remove FIXMEs. The scope of a Variable is always a lexical scope; there is
nothing to be gained from switching this over to a DIScopeRef.

llvm-svn: 205281
2014-04-01 03:50:01 +00:00
Adrian Prantl
860533bd61 LTO type uniquing: store the Decl field of a DIImportedEntity as a DIRef.
No other functionality changes, DIBuilder testcase is included in a paired
CFE commit.

This relaxes the assertion in isScopeRef to also accept subclasses of
DIScope.

llvm-svn: 205279
2014-04-01 03:41:04 +00:00
Adrian Prantl
86ecdb7ddb Add a comment about type-uniquing ObjC types.
llvm-svn: 205277
2014-04-01 03:40:59 +00:00
David Blaikie
2fa4ca8cd8 Comment to describe the debug_loc.dwo constants
Code review feedback from Eric Christopher on r204697

llvm-svn: 205268
2014-03-31 23:50:20 +00:00
Hal Finkel
dc0e116444 Move partial/runtime unrolling late in the pipeline
The generic (concatenation) loop unroller is currently placed early in the
standard optimization pipeline. This is a good place to perform full unrolling,
but not the right place to perform partial/runtime unrolling. However, most
targets don't enable partial/runtime unrolling, so this never mattered.

However, even some x86 cores benefit from partial/runtime unrolling of very
small loops, and follow-up commits will enable this. First, we need to move
partial/runtime unrolling late in the optimization pipeline (importantly, this
is after SLP and loop vectorization, as vectorization can drastically change
the size of a loop), while keeping the full unrolling where it is now. This
change does just that.

llvm-svn: 205264
2014-03-31 23:23:51 +00:00