Commit Graph

17619 Commits

Author SHA1 Message Date
Jakub Staszak
9bc2c99482 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175579 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-20 00:17:42 +00:00
Jack Carter
5cdeca8b1d 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 22:29:00 +00:00
Jack Carter
c989c61798 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175566 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 22:14:34 +00:00
Jack Carter
ccb3c9c270 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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175564 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 22:04:37 +00:00
Jack Carter
77afbdce53 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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175561 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 21:57:35 +00:00
Jakub Staszak
fef8b70f9d Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 21:49:54 +00:00
Nadav Rotem
03544ec2a4 Fix a bug in mayHaveSideEffects. Functions that do not return are now considered as instructions with side effects.
rdar://13227456



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175553 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 20:02:09 +00:00
Douglas Gregor
1f1713ff7a Remove my bogus MapVector::erase() with a narrower ::pop_back(), and add a unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175538 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 18:26:07 +00:00
Alexey Samsonov
9f306bdc70 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175509 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 11:35:39 +00:00
Eric Christopher
4913d7b3b2 Grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175493 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 06:23:44 +00:00
Bill Wendling
5b0a8d9ca6 Add some convenience methods for querying function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175469 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 23:16:42 +00:00
David Blaikie
a39058aaed Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments.
Also removes some redundant DNI comments on function declarations already
using the macro.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175466 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 23:11:17 +00:00
Benjamin Kramer
98fbe27ac8 Support for HiPE-compatible code emission, patch by Yiannis Tsiouris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175457 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 20:55:12 +00:00
Jakub Staszak
fbed8555ad 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 18:49:44 +00:00
Douglas Gregor
888fae7b49 Add front/back/erase to MapVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 16:03:04 +00:00
Benjamin Kramer
3f213e7b3a 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175437 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 12:09:51 +00:00
David Blaikie
e2952f956a Add unsigned DISubprogram::getFlags() const for DragonEgg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175430 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 08:04:16 +00:00
David Blaikie
4293f4e4d9 Add DIFile DISubprogram::getFile() const for DragonEgg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175428 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 07:54:55 +00:00
David Blaikie
d67c5cab3b Narrow the return types of a few DIBuilder utility functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175421 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 06:41:57 +00:00
Duncan Sands
906727dcfe Add multithreading functions and shutdown to the C API. Patch by Moritz
Maxeiner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175398 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-17 16:35:51 +00:00
Cameron Zwarich
680c98f632 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175393 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-17 11:09:00 +00:00
Cameron Zwarich
7324d4e593 Use ArrayRef instead of a reference to a SmallVectorImpl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175385 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-17 03:48:23 +00:00
Cameron Zwarich
f0b2535344 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175382 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-17 00:10:44 +00:00
Benjamin Kramer
886a7663c7 Remove comma at the end of enum. Still my favourite C++11 feature.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175372 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-16 19:15:28 +00:00
Benjamin Kramer
c835b8c301 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175370 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-16 19:13:18 +00:00
Jakub Staszak
b717a50847 Use const reference instead of vector object when passing an argument to
updateScheduledPressure method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175362 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-16 15:47:26 +00:00
Jakub Staszak
a293782b17 Add even more constatness in MachineDominators.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175358 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-16 12:36:32 +00:00
Jakub Staszak
55ba691dce Add some constantness in Machine Dominators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175344 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-16 11:08:16 +00:00
Jakub Staszak
7209987f26 Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175343 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-16 11:02:28 +00:00
Michael J. Spencer
6d3a278aab [ELF] Add STN_UNDEF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175338 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-16 01:56:36 +00:00
Chad Rosier
b56606274d [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175334 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-16 01:25:28 +00:00
Matt Beaumont-Gay
b075ed3b90 Pacify -Wnon-virtual-dtor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175324 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-15 23:51:59 +00:00
Bill Wendling
789cb5df9c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175314 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-15 22:31:27 +00:00
Sebastian Pop
0deff9fbeb capitalize SCEV to match the current naming convention
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175302 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-15 21:26:36 +00:00
Sebastian Pop
5661fcdde2 add ScevApplyRewriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175294 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-15 20:55:36 +00:00
Sebastian Pop
a9e4d3f375 add SCEVParameterRewriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175293 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-15 20:55:33 +00:00
Hal Finkel
ab90084bca 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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175251 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-15 04:28:42 +00:00
Preston Gurd
e2e00dffdf Mark getRawBits const.
Patch by Tyler Nowicki.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175218 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14 22:49:29 +00:00
Bill Wendling
296756a2b5 s/bool/LLVMBool/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175203 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14 19:39:14 +00:00
Bill Wendling
31cfc70705 Add two new functions to the C API:
LLVMCreateMemoryBufferWithMemoryRange - exposes MemoryBuffer::getMemBuffer
 LLVMCreateMemoryBufferWithMemoryRangeCopy - exposes MemoryBuffer::getMemBufferCopy

Patch by Moritz Maxeiner!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175199 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14 19:11:28 +00:00
Dmitry Vyukov
06121de923 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14 18:41:42 +00:00
Tim Northover
ff9d058f28 Add deprecation of neverHasSideEffects to documentation comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175175 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14 16:31:06 +00:00
Francois Pichet
a94d32284a Add missing typename to unbreak the MSVC 2012 build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175129 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14 03:24:14 +00:00
Alex Rosenberg
ff91f2ef47 llvm-gcc -pedantic warns about C++ comments in C90 mode even if they're
inside an #if 0 block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175098 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 22:45:52 +00:00
Ryan Govostes
779a96362e Fix iterator definitions for ImmutableSet and ImmutableMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175097 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 22:37:27 +00:00
Ryan Govostes
3df02ac9d4 Add iterator_traits to ImmutableMap and ImmutableSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175085 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 21:38:22 +00:00
Pekka Jaaskelainen
5d0ce79e26 Metadata for annotating loops as parallel. The first consumer for this
metadata is the loop vectorizer.

See the documentation update for more info.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175060 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 18:08:57 +00:00
Evgeniy Stepanov
782a65056a Fix MSan annotations inclusion guard.
#cmakedefine does not behave the way I though it was.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175050 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 10:40:01 +00:00
Bill Wendling
0e9d5d059c Add some accessor and query methods for retrieving Attribute objects and such.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175046 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 08:42:21 +00:00
Craig Topper
cef6cfe4a6 Remove unnecessary condtional assignment. The next line ignores the result of the assignment with the same condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175042 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13 07:44:17 +00:00