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

17579 Commits

Author SHA1 Message Date
Cameron Zwarich
277fc532b7 Fix a misunderstanding about how RegMaskBlocks works. This was caught by
assertions in the register allocator when running 'make check' without
LiveVariables.

llvm-svn: 175599
2013-02-20 06:46:36 +00:00
David Blaikie
05260669b1 Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.
Code review feedback on r175580 from Jordan Rose.

llvm-svn: 175595
2013-02-20 06:25:36 +00:00
Michael J. Spencer
6270bca74a [llvm-readobj] Add ELF .dynamic table dumping.
llvm-svn: 175592
2013-02-20 02:37:12 +00:00
Jakub Staszak
fa42b5d77d Remove unneeded #include.
llvm-svn: 175584
2013-02-20 00:32:19 +00:00
Jakub Staszak
145f80a35b Fix #includes, so we include only what we really need.
llvm-svn: 175581
2013-02-20 00:26:25 +00:00
David Blaikie
cbe2e7eb6b Allow llvm::Optional to work with types without default constructors.
This generalizes Optional to require less from the T type by using aligned
storage for backing & placement new/deleting the T into it when necessary.

Also includes unit tests.

llvm-svn: 175580
2013-02-20 00:26:04 +00:00
Jakub Staszak
c4692feb81 Move part of APInt implementation from header to cpp file. These methods
require call cpp file anyway, so we wouldn't gain anything by keeping them
inline.

llvm-svn: 175579
2013-02-20 00:17:42 +00:00
Jack Carter
ecca606341 ELF symbol table field st_other support,
excluding visibility bits.

Mips (o32 abi) specific e_header setting.

EF_MIPS_ABI_O32 needs to be set in the 
ELF header flags for o32 abi output.

Contributer: Reed Kotler
llvm-svn: 175569
2013-02-19 22:29:00 +00:00
Jack Carter
9b85d941b3 ELF symbol table field st_other support,
excluding visibility bits.

Mips (Mips16) specific e_header setting.

EF_MIPS_ARCH_ASE_M16 needs to be set in the 
ELF header flags for Mips16.

Contributer: Reed Kotler
llvm-svn: 175566
2013-02-19 22:14:34 +00:00
Jack Carter
3c286a1400 ELF symbol table field st_other support,
excluding visibility bits.

Mips (MicroMips) specific STO handling .

The st_other field settig for STO_MIPS_MICROMIPS

Contributer: Zoran Jovanovic
llvm-svn: 175564
2013-02-19 22:04:37 +00:00
Jack Carter
c2996594d9 ELF symbol table field st_other support,
excluding visibility bits.

Generic STO handling at the Target level.

The st_other field of the ELF symbol table is one
byte in size. The first 2 bytes are used for generic
visibility and are currently handled by llvm.

The other six bits are processor specific and need 
to be set at the target level.

A couple of notes:

The new static methods for accessing and setting the "other"
flags in include/llvm/MC/MCELF.h match the style guide
and not the other methods in the file. I don't like the
inconsistency, but feel I should follow the prescribed 
lowerUpper() convention.

STO_ value definitions are not specified in gnu land as 
consistently as the STT_ and STB_ fields. Probably because
the latter were defined in a standards doc and the former
defined partially in code. I have stuck with the full byte
definition of the flags.

Contributer: Zoran Jovanovic
llvm-svn: 175561
2013-02-19 21:57:35 +00:00
Jakub Staszak
ec606942d2 Simplify code. No functionality change.
llvm-svn: 175559
2013-02-19 21:49:54 +00:00
Nadav Rotem
f1aab5f6b7 Fix a bug in mayHaveSideEffects. Functions that do not return are now considered as instructions with side effects.
rdar://13227456

llvm-svn: 175553
2013-02-19 20:02:09 +00:00
Douglas Gregor
567c8d3dc3 Remove my bogus MapVector::erase() with a narrower ::pop_back(), and add a unit test.
llvm-svn: 175538
2013-02-19 18:26:07 +00:00
Alexey Samsonov
6302cc4a29 Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explicitly called during module initialization of lib/Support/Process.cpp. It reads the field of global object PosixZeroTime, which is not guaranteed to be initialized at this point. Found by AddressSanitizer with -fsanitize=init-order option.
llvm-svn: 175509
2013-02-19 11:35:39 +00:00
Eric Christopher
f04844d040 Grammar.
llvm-svn: 175493
2013-02-19 06:23:44 +00:00
Bill Wendling
1dc814742d Add some convenience methods for querying function attributes.
llvm-svn: 175469
2013-02-18 23:16:42 +00:00
David Blaikie
a1251c8987 Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments.
Also removes some redundant DNI comments on function declarations already
using the macro.

llvm-svn: 175466
2013-02-18 23:11:17 +00:00
Benjamin Kramer
462b555ebe Support for HiPE-compatible code emission, patch by Yiannis Tsiouris.
llvm-svn: 175457
2013-02-18 20:55:12 +00:00
Jakub Staszak
d601b05421 Use llvm::cast instead of reinterpret_cast.
Also, GetElementPtrInst::getType() method returns SequentialType now, instead of
PointerType. There wasn't any issue yet, so no testcase attached.

llvm-svn: 175452
2013-02-18 18:49:44 +00:00
Douglas Gregor
27598c477d Add front/back/erase to MapVector.
llvm-svn: 175449
2013-02-18 16:03:04 +00:00
Benjamin Kramer
3137f73f0e Futureproof AttrBuild if we ever have more than 64 attr enum values.
Currently we're at 34. Bitset should compile into virtually the same code as
uint64_t here.

llvm-svn: 175437
2013-02-18 12:09:51 +00:00
David Blaikie
81b0346d54 Add unsigned DISubprogram::getFlags() const for DragonEgg.
llvm-svn: 175430
2013-02-18 08:04:16 +00:00
David Blaikie
0bf41d5263 Add DIFile DISubprogram::getFile() const for DragonEgg.
llvm-svn: 175428
2013-02-18 07:54:55 +00:00
David Blaikie
4cbcad5731 Narrow the return types of a few DIBuilder utility functions.
llvm-svn: 175421
2013-02-18 06:41:57 +00:00
Duncan Sands
b50d4cfa0b Add multithreading functions and shutdown to the C API. Patch by Moritz
Maxeiner.

llvm-svn: 175398
2013-02-17 16:35:51 +00:00
Cameron Zwarich
64d5855006 Remove use of reverse iterators in repairIntervalsInRange(). While they were
arguably better than forward iterators for this use case, they are confusing and
there are some implementation problems with reverse iterators and MI bundles.

llvm-svn: 175393
2013-02-17 11:09:00 +00:00
Cameron Zwarich
47a048b311 Use ArrayRef instead of a reference to a SmallVectorImpl.
llvm-svn: 175385
2013-02-17 03:48:23 +00:00
Cameron Zwarich
d1bc439d40 Add support for updating the LiveIntervals of registers used by 'exotic'
terminators that actually have register uses when splitting critical edges.

This commit also introduces a method repairIntervalsInRange() on LiveIntervals,
which allows for repairing LiveIntervals in a small range after an arbitrary
target hook modifies, inserts, and removes instructions. It's pretty limited
right now, but I hope to extend it to support all of the things that are done
by the convertToThreeAddress() target hooks.

llvm-svn: 175382
2013-02-17 00:10:44 +00:00
Benjamin Kramer
684f7b56ee Remove comma at the end of enum. Still my favourite C++11 feature.
llvm-svn: 175372
2013-02-16 19:15:28 +00:00
Benjamin Kramer
493e1a2895 Turn the enum attributes DenseSet in AttrBuilder into a set of bits.
Avoids malloc and is a lot denser. We lose iteration over target independent
attributes, but that's a strange interface anyways and didn't have any users
outside of AttrBuilder.

llvm-svn: 175370
2013-02-16 19:13:18 +00:00
Jakub Staszak
a2269e01cd Use const reference instead of vector object when passing an argument to
updateScheduledPressure method.

llvm-svn: 175362
2013-02-16 15:47:26 +00:00
Jakub Staszak
90d6cd310a Add even more constatness in MachineDominators.h.
llvm-svn: 175358
2013-02-16 12:36:32 +00:00
Jakub Staszak
42edb23ede Add some constantness in Machine Dominators.
llvm-svn: 175344
2013-02-16 11:08:16 +00:00
Jakub Staszak
cd6f685330 Remove trailing spaces.
llvm-svn: 175343
2013-02-16 11:02:28 +00:00
Michael J. Spencer
7e31a3daa9 [ELF] Add STN_UNDEF.
llvm-svn: 175338
2013-02-16 01:56:36 +00:00
Chad Rosier
1062ec80b5 [ms-inline asm] Do not omit the frame pointer if we have ms-inline assembly.
If the frame pointer is omitted, and any stack changes occur in the inline
assembly, e.g.: "pusha", then any C local variable or C argument references
will be incorrect.  

I pass no judgement on anyone who would do such a thing. ;)
rdar://13218191

llvm-svn: 175334
2013-02-16 01:25:28 +00:00
Matt Beaumont-Gay
b51e599e7c Pacify -Wnon-virtual-dtor
llvm-svn: 175324
2013-02-15 23:51:59 +00:00
Bill Wendling
cc20bdf27b Use the 'target-features' and 'target-cpu' attributes to reset the subtarget features.
If two functions require different features (e.g., `-mno-sse' vs. `-msse') then
we want to honor that, especially during LTO. We can do that by resetting the
subtarget's features depending upon the 'target-feature' attribute.

llvm-svn: 175314
2013-02-15 22:31:27 +00:00
Sebastian Pop
9ba118839a capitalize SCEV to match the current naming convention
llvm-svn: 175302
2013-02-15 21:26:36 +00:00
Sebastian Pop
dcd2e49372 add ScevApplyRewriter
llvm-svn: 175294
2013-02-15 20:55:36 +00:00
Sebastian Pop
de5fdbd414 add SCEVParameterRewriter
llvm-svn: 175293
2013-02-15 20:55:33 +00:00
Hal Finkel
5e320e9019 BBVectorize: Cap the number of candidate pairs in each instruction group
For some basic blocks, it is possible to generate many candidate pairs for
relatively few pairable instructions. When many (tens of thousands) of these pairs
are generated for a single instruction group, the time taken to generate and
rank the different vectorization plans can become quite large. As a result, we now
cap the number of candidate pairs within each instruction group. This is done by
closing out the group once the threshold is reached (set now at 3000 pairs).

Although this will limit the overall compile-time impact, this may not be the best
way to achieve this result. It might be better, for example, to prune excessive
candidate pairs after the fact the prevent the generation of short, but highly-connected
groups. We can experiment with this in the future.

This change reduces the overall compile-time slowdown of the csa.ll test case in
PR15222 to ~5x. If 5x is still considered too large, a lower limit can be
used as the default.

This represents a functionality change, but only for very large inputs
(thus, there is no regression test).

llvm-svn: 175251
2013-02-15 04:28:42 +00:00
Preston Gurd
d2b7797529 Mark getRawBits const.
Patch by Tyler Nowicki.

llvm-svn: 175218
2013-02-14 22:49:29 +00:00
Bill Wendling
3263ae2d36 s/bool/LLVMBool/
llvm-svn: 175203
2013-02-14 19:39:14 +00:00
Bill Wendling
cff8f3e5f2 Add two new functions to the C API:
LLVMCreateMemoryBufferWithMemoryRange - exposes MemoryBuffer::getMemBuffer
 LLVMCreateMemoryBufferWithMemoryRangeCopy - exposes MemoryBuffer::getMemBufferCopy

Patch by Moritz Maxeiner!

llvm-svn: 175199
2013-02-14 19:11:28 +00:00
Dmitry Vyukov
85b0b97f34 include/llvm/Object/ELF.h: do debug checks only when NDEBUG
validateSymbol() is called all over the place, and it seems it's a debug check.
It significantly speedups llvm-symbolizer used in tsan/asan/msan. validateSymbol() is the second hot function and accounts for 15% of runtime.

llvm-svn: 175192
2013-02-14 18:41:42 +00:00
Tim Northover
8e64e01243 Add deprecation of neverHasSideEffects to documentation comments.
llvm-svn: 175175
2013-02-14 16:31:06 +00:00
Francois Pichet
9e29d95f36 Add missing typename to unbreak the MSVC 2012 build.
llvm-svn: 175129
2013-02-14 03:24:14 +00:00
Alex Rosenberg
049e287117 llvm-gcc -pedantic warns about C++ comments in C90 mode even if they're
inside an #if 0 block.

llvm-svn: 175098
2013-02-13 22:45:52 +00:00