Commit Graph

17251 Commits

Author SHA1 Message Date
Manman Ren
43213cf1ac Dwarf: support for LTO where a single object file can have multiple line tables
We generate one line table for each compilation unit in the object file.
Reviewed by Eric and Kevin.

rdar://problem/13067005


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174445 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:52:47 +00:00
Jakob Stoklund Olesen
e6dc59891f Remove liveout lists from MachineRegisterInfo.
All targets are now adding return value registers as implicit uses on
return instructions, and there is no longer a need for the live out
lists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174417 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 18:21:56 +00:00
Derek Schuff
f918d7fd73 [MC] Bundle alignment: Invalidate relaxed fragments
Currently, when a fragment is relaxed, its size is modified, but its
offset is not (it gets laid out as a side effect of checking whether
it needs relaxation), then all subsequent fragments are invalidated
because their offsets need to change. When bundling is enabled,
relaxed fragments need to get laid out again, because the increase in
size may push it over a bundle boundary. So instead of only
invalidating subsequent fragments, also invalidate the fragment that
gets relaxed, which causes it to get laid out again.

This patch also fixes some trailing whitespace and fixes the
bundling-related debug output of MCFragments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174401 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 17:55:27 +00:00
Eli Bendersky
97ebecaa79 Format comments & clean whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174396 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 17:10:07 +00:00
Eli Bendersky
1b2c947136 Fix comment formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174388 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 16:40:22 +00:00
Meador Inge
2ebc580638 Support: ensure proper state in ErrorOr copy ctors before calling 'get'
Some paths through the copy constructors for 'ErrorOr' were calling
'get' when 'HasError' and 'IsValid' were not properly initialized.
Depending on what happened to be in memory for those member variables
the asserts in 'get' might incorrectly fire.  Fixed by ensuring that
the member variables in question are always initialized before calling
'get'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174381 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 15:41:27 +00:00
Jack Carter
7304702ef9 This patch that sets the Mips ELF header flag for
MicroMips architectures. 

Contributer: Zoran Jovanovic
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174360 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 09:30:03 +00:00
Michael J. Spencer
a33e1fafac [Support][ErrorOr] Add support for convertable types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 08:22:27 +00:00
Bill Wendling
ea59f896a6 Add target-dependent versions of addAttribute/removeAttribute to AttrBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 08:09:32 +00:00
Michael Gottesman
ca531fd486 Changed in comment cxx -> C++. Thanks Richard Smith!.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174355 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 08:01:22 +00:00
Jack Carter
9c5b94b6be This patch changes a static_cast to dyn_cast
for MipsELFStreamer objects.

Contributer: Jack Carter
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174354 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 07:47:41 +00:00
Michael Gottesman
e1b6b52903 Add code to GlobalVariable.h so that global variables marked as
externally_initialized return false for hasDefiniteInitializer and
hasUniqueInitializer.

rdar://12580965.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174345 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 06:53:26 +00:00
Bill Wendling
f9271ea159 Initial cleanups of the param-attribute code in the bitcode reader/writer.
Rename the PARAMATTR_CODE_ENTRY to PARAMATTR_CODE_ENTRY_OLD. It will be replaced
by another encoding. Keep around the current LLVM attribute encoder/decoder
code, but move it to the bitcode directories so that no one's tempted to use
them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174335 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 23:32:23 +00:00
Benjamin Kramer
4969310052 SelectionDAG: Teach FoldConstantArithmetic how to deal with vectors.
This required disabling a PowerPC optimization that did the following:
input:
x = BUILD_VECTOR <i32 16, i32 16, i32 16, i32 16>
lowered to:
tmp = BUILD_VECTOR <i32 8, i32 8, i32 8, i32 8>
x = ADD tmp, tmp

The add now gets folded immediately and we're back at the BUILD_VECTOR we
started from. I don't see a way to fix this currently so I left it disabled
for now.

Fix some trivially foldable X86 tests too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174325 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 15:19:18 +00:00
Evgeniy Stepanov
9c02a27604 More MSan/ASan annotations.
This change lets us bootstrap LLVM/Clang under ASan and MSan. It contains
fixes for 2 issues:

- X86JIT reads return address from stack, which MSan does not know is
  initialized.
- bugpoint tests run binaries with RLIMIT_AS. This does not work with certain
  Sanitizers.

We are no longer including config.h in Compiler.h with this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174306 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04 07:03:24 +00:00
Michael Gottesman
af2f494c2d Added instance variable/initializers/getter/setters for new keyword externally initialized to GlobalVariable. No *TRUE* functionality change.
I am going to add in the actual test cases with the actual functionality
changes in a later patch because I want to include some test cases.

To be clear when I say no *TRUE* functionality change I mean that this
patch (like it says in the title) only contains getters/setters and sets
up a default initial value of the instance variable to false so that
this patch does not affect any other uses of Global Variable.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174295 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-03 21:54:38 +00:00
Michael J. Spencer
0f76e648d8 [Object][Archive] Improve performance.
Improve performance of iterating over children and accessing the member file
buffer by caching the file size and moving code out to the header.

This also makes getBuffer return a StringRef instead of a MemoryBuffer. Both
fixing a memory leak and removing a malloc.

This takes getBuffer from ~10% of the time in lld to unmeasurable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174272 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-03 10:48:50 +00:00
Michael J. Spencer
d9d2f18775 [Support] Add LLVM_IS_UNALIGNED_ACCESS_FAST.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174271 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-03 10:48:31 +00:00
Bill Wendling
fca0ed28c8 Remove AttrBuilder::Raw().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174251 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-02 00:52:44 +00:00
Manman Ren
7650d9b893 Correct indentation for dumping LexicalScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-02 00:02:03 +00:00
Bill Wendling
5a4041e728 Change the AttributeImpl to hold a single Constant* for the values.
This Constant could be an aggregate to represent multiple values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174228 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 22:32:30 +00:00
Bill Wendling
f715dbd263 Remove one of the odious 'Raw' methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174130 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 00:48:14 +00:00
Bill Wendling
16c4b3cf29 Add iterators to the AttributeSet class so that we can access the Attributes in a nice way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174120 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 23:53:05 +00:00
Chandler Carruth
2d4fd7e6b6 Fix a think-o in the condition here. =[ I would commit the test that
caught this, but I want that in a separate commit in case there is
a need to revert the actual functional bit as part of reverting other
patches. This way, the commits relating to just getting the RTTI bits in
place are separate from the functional changes that start using them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174117 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 23:43:12 +00:00
Bill Wendling
39da078977 s/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descriptive of what it actually is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174116 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 23:38:01 +00:00
Chandler Carruth
5da3665cc5 Give the MCStreamer class hierarchy LLVM RTTI facilities for use with
isa<> and dyn_cast<>. In several places, code is already hacking around
the absence of this, and there seem to be several interfaces that might
be lifted and/or devirtualized using this.

This change was based on a discussion with Jim Grosbach about how best
to handle testing for specific MCStreamer subclasses. He said that this
was the correct end state, and everything else was too hacky so
I decided to just make it so.

No functionality should be changed here, this is just threading the kind
through all the constructors and setting up the classof overloads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174113 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 23:29:57 +00:00
Bill Wendling
169d527075 Remove the AttrBuilder form of the Attribute::get creators.
The AttrBuilder is for building a collection of attributes. The Attribute object
holds only one attribute. So it's not really useful for the Attribute object to
have a creator which takes an AttrBuilder.

This has two fallouts:

1. The AttrBuilder no longer holds its internal attributes in a bit-mask form.
2. The attributes are now ordered alphabetically (hence why the tests have changed).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174110 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 23:16:25 +00:00
Dan Gohman
43d836343e Document another instsimplify assumption.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174100 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 22:13:00 +00:00
Chad Rosier
108fb3202a [PEI] Pass the frame index operand number to the eliminateFrameIndex function.
Each target implementation was needlessly recomputing the index.
Part of rdar://13076458

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174083 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 20:02:54 +00:00
Tim Northover
72062f5744 Add AArch64 as an experimental target.
This patch adds support for AArch64 (ARM's 64-bit architecture) to
LLVM in the "experimental" category. Currently, it won't be built
unless requested explicitly.

This initial commit should have support for:
    + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions
      (except the late addition CRC instructions).
    + CodeGen features required for C++03 and C99.
    + Compilation for the "small" memory model: code+static data <
      4GB.
    + Absolute and position-independent code.
    + GNU-style (i.e. "__thread") TLS.
    + Debugging information.

The principal omission, currently, is performance tuning.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174054 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 12:12:40 +00:00
Evgeniy Stepanov
ea2d8780e9 Annotate BumpPtrAllocator for MemorySanitizer.
This change adds MemorySanitizer annotations to BumpPtrAllocator to
improve report quality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174051 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 09:58:59 +00:00
Bill Wendling
82aea644c6 Remove the Attribute::hasAttributes() function.
That function doesn't make sense anymore because there's only one attribute per
Attribute object now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174044 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 06:22:35 +00:00
NAKAMURA Takumi
eddab1550e Revert r174026, "Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private."
It broke many hosts to crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174035 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 03:47:28 +00:00
Dan Gohman
de0eb19248 Move isKnownNonNull out of AliasAnalysis.h and into ValueTracking.cpp since
it isn't really an AliasAnalysis concept, and ValueTracking has similar things
that it could plausibly share code with some day.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174027 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 02:40:59 +00:00
Bill Wendling
85238aae1a Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private.
The Attribute::hasAttributes() is kind of meaningless since an Attribute can
have only one attribute. And we would rather people use the 'operator=='
instead of Attribute::hasAttribute().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 02:18:19 +00:00
Dan Gohman
a070d2a035 Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174024 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 02:00:45 +00:00
Bill Wendling
8ed701da9a Make the AttrBuilder creation method of Attribute private so that people won't use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174023 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 01:51:27 +00:00
Bill Wendling
b96129dd48 Revert for now:
--- Reverse-merging r174010 into '.':
U    include/llvm/IR/Attributes.h
U    lib/IR/Verifier.cpp
U    lib/IR/Attributes.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174012 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 01:04:51 +00:00
Bill Wendling
c6077eff8b Remove the AttrBuilder version of the Attribute::get function.
The AttrBuilder is there to build up multiple attributes. The Attribute class
represents only one attribute at a time. So remove this unnecessary builder
creator method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174010 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 00:53:21 +00:00
Bill Wendling
73dee180c8 Make sure that the Attribute object represents one attribute only.
Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174003 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 00:29:54 +00:00
Bill Wendling
ac72eb264c Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173992 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 23:40:31 +00:00
Bill Wendling
e74365462a Convert typeIncompatible to return an AttributeSet.
There are still places which treat the Attribute object as a collection of
attributes. I'm systematically removing them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173990 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 23:07:40 +00:00
Michael Gottesman
bc977bab42 Doxygenified some comments in IRBuilder.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173986 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 22:56:31 +00:00
Michael Gottesman
f84d4c16b3 Removed CreateFPExtOrFPTrunc for now until I have the time to get in my vector convert patch.
What I thought was going to be a quick thing has extended out a little bit in
time *sigh*. So after some thought in order to not cruft up the tree I am
removing this for now since it is the right thing to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173985 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 22:53:21 +00:00
Michael Gottesman
e502bba8c6 Encapsulate testing that we have an iOS Triple in Triple.h in the method isiOS
so we follow the convention that all other platforms follow by having an is*
test method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173983 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 22:38:19 +00:00
Bill Wendling
aa57893e84 Use the number of 'slots' in the AttributeSetImpl being 0 to indicate that the AttributeSet is empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173962 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 19:39:21 +00:00
Eli Bendersky
f578c89dc6 Clean up whitespace and indentation a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173960 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 19:24:23 +00:00
Dmitri Gribenko
f121b79a6a LLDB uses ConvertUTF16toUTF8, remove #ifdef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173936 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 15:10:12 +00:00
Dmitri Gribenko
328027bf26 Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support
This is required to use them in TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173923 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 12:05:05 +00:00
Jack Carter
97130e2b3d This patch implements runtime ARM specific
setting of ELF header e_flags.

Contributer: Jack Carter
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173885 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 02:24:33 +00:00