Commit Graph

89007 Commits

Author SHA1 Message Date
Michael Gottesman ef2bc77330 Added clarification paragraph to LangRef's documentation of
GlobalVariable about LLVM's assumptions vis-a-vis Global Variable
initial values and Global Variable initializers.

This is in preparation for adding the new keyword
externally_initialized.

Specifically, the patch explains how LLVM optimizes global initializers
by assumign that global variables defined within the module are not
modified from their initial values before the start of the global
initializer.

llvm-svn: 174269
2013-02-03 09:57:15 +00:00
David Blaikie 33111dfea0 Remove the (apparently) unnecessary debug info metadata indirection.
The main lists of debug info metadata attached to the compile_unit had an extra
layer of metadata nodes they went through for no apparent reason. This patch
removes that (& still passes just as much of the GDB 7.5 test suite). If anyone
can show evidence as to why these extra metadata nodes are there I'm open to
reverting this patch & documenting why they're there.

llvm-svn: 174266
2013-02-02 05:56:24 +00:00
Reed Kotler f8933f83f0 Start static relocation implementation for mips16.
This checkin makes hello world work. 

llvm-svn: 174264
2013-02-02 04:07:35 +00:00
Manman Ren 053e4ff008 Removing ssp and uwtable from the testcase
llvm-svn: 174259
2013-02-02 01:34:38 +00:00
Bill Wendling 9122618307 Remove AttrBuilder::Raw().
llvm-svn: 174251
2013-02-02 00:52:44 +00:00
Bill Wendling 9ca01da53d Use the AttributeSet's iterators.
Use the AttributeSet's iterators in AttrBuilder::hasAttributes() when
determining of the intersection of the AttrBuilder and AttributeSet is non-null.

llvm-svn: 174250
2013-02-02 00:42:06 +00:00
Nick Lewycky 535d97cc86 Revert accidental commit (ran svn commit from wrong directory).
llvm-svn: 174241
2013-02-02 00:25:26 +00:00
Nick Lewycky a8c77e4266 This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use.

Also fixes a bug in the previous patch that caused us to not mark the function
referenced just because we didn't want to mark it odr used.

llvm-svn: 174240
2013-02-02 00:22:37 +00:00
Shuxin Yang cadd8a068e rdar://13126763
Fix a bug in DAGCombine. The symptom is mistakenly optimizing expression
"x + x*x" into "x * 3.0".

llvm-svn: 174239
2013-02-02 00:22:03 +00:00
Manman Ren e498b25bc5 Correct indentation for dumping LexicalScope.
llvm-svn: 174237
2013-02-02 00:02:03 +00:00
Manman Ren e697d3cd2e [Dwarf] avoid emitting multiple AT_const_value for static memebers.
Testing case is reduced from MultiSource/BenchMarks/Prolangs-C++/deriv1.

rdar://problem/13071590

llvm-svn: 174235
2013-02-01 23:54:37 +00:00
Bill Schmidt cc99a2f61d Add notes about future PowerPC features
llvm-svn: 174232
2013-02-01 23:10:09 +00:00
Bill Schmidt 52742c25ae LLVM enablement for some older PowerPC CPUs
llvm-svn: 174230
2013-02-01 22:59:51 +00:00
Bill Wendling 7a33f779b9 Change the AttributeImpl to hold a single Constant* for the values.
This Constant could be an aggregate to represent multiple values.

llvm-svn: 174228
2013-02-01 22:32:30 +00:00
Preston Gurd 25c3b6acc0 This patch aims to improve compile time performance by increasing
the SCEV vector size in LoopStrengthReduce. It is observed that
the BaseRegs vector size is 4 in most cases,
and elements are frequently copied when it is initialized as
SmallVector<const SCEV *, 2> BaseRegs.
Our benchmark results show that the compilation time performance
improved by ~0.5%.

Patch by Wan Xiaofei.

llvm-svn: 174219
2013-02-01 20:41:27 +00:00
Dan Gohman 9ee4bc1abc Add a testcase for some past-the-end address subtleties.
llvm-svn: 174210
2013-02-01 19:37:52 +00:00
David Sehr 8114a7a651 Two changes relevant to LEA and x32:
1) allows the use of RIP-relative addressing in 32-bit LEA instructions under
   x86-64 (ILP32 and LP64)
2) separates the size of address registers in 64-bit LEA instructions from
   control by ILP32/LP64.

llvm-svn: 174208
2013-02-01 19:28:09 +00:00
Nadav Rotem f04cbeb357 Fix errant fallthrough in the generation of the lifetime markers.
Found by Alexander Kornienko.

llvm-svn: 174207
2013-02-01 19:25:23 +00:00
Jim Grosbach d0ef72808c Fix misplaced 'break'.
llvm-svn: 174205
2013-02-01 18:57:06 +00:00
Chad Rosier 12d7800a9b Use a continue to simplify loop and reduce indentation. No functional change.
llvm-svn: 174198
2013-02-01 17:49:07 +00:00
Jyotsna Verma 10f5c2db4e Hexagon: Test case to confirm generation of indexed loads with zero offset.
llvm-svn: 174196
2013-02-01 16:40:06 +00:00
Jyotsna Verma 2ceafa6684 Replace LDriu*[bhdw]_indexed_V4 instructions with "def Pats".
llvm-svn: 174193
2013-02-01 16:36:16 +00:00
Jyotsna Verma d6eda1c227 Add appropriate TSFlags to the instructions that must be always extended.
llvm-svn: 174186
2013-02-01 15:54:43 +00:00
Benjamin Kramer c05aa958b1 InstSimplify: stripAndComputeConstantOffsets can be called with vectors of pointers too.
Prepare it for vectors of pointers and handle simple cases. We don't handle
complicated cases because accumulateConstantOffset bails on pointer vectors.
Fixes selfhost on i386.

llvm-svn: 174179
2013-02-01 15:21:10 +00:00
Tim Northover 111b6cb37b Remove currently unused register decoder from AArch64.
This should fix a warning when building this backend.

llvm-svn: 174177
2013-02-01 14:55:05 +00:00
Tim Northover e3d4236402 Add explicit triples to AArch64 tests
Only Linux is supported at the moment, and other platforms quickly fault. As a
result these tests would fail on non-Linux hosts. It may be worth making the
tests more generic again as more platforms are supported.

llvm-svn: 174170
2013-02-01 11:40:47 +00:00
Nadav Rotem 4349f6963e Revert r174152. The shift amount may overflow and in that case this transformation is illegal.
llvm-svn: 174156
2013-02-01 07:59:33 +00:00
Nadav Rotem 1d584029ae Optimize shift lefts of a constant by a value plus constant into a single shift.
llvm-svn: 174152
2013-02-01 06:45:40 +00:00
Sean Silva 59e7bd5b5e [docs] Fixup fallout from other grammar fixup.
My "excuse" for not refactoring the grammar here is to not diverge too
far from the grammar in the comments of TGParser.cpp, since I'm not
taking on the quest of majorly refactoring TGParser.cpp at the moment.

One benefit of doing this is that Ideas for refactoring and clarifying
the grammar in this document should translate almost immediately to
beneficial refactorings that can be made to TGParser.cpp.

llvm-svn: 174144
2013-02-01 03:50:20 +00:00
Sean Silva 6868ac4c9c [docs] Add missing colon to TableGen grammar.
Spotted by Eli Bendersky.

llvm-svn: 174143
2013-02-01 03:32:38 +00:00
Andrew Trick 4fe440d45c MachineModel: Inconsequential TableGen SubtargetEmitter fix.
Drive by fix. I noticed some missing logic that might bite future
users. This shouldn't affect the final output on currently modeled
targets.

llvm-svn: 174142
2013-02-01 03:19:54 +00:00
Bill Wendling c79cdff195 Remove some dead code, improve some asserts, and other assorted changes. No functionality change.
llvm-svn: 174132
2013-02-01 01:04:27 +00:00
Dan Gohman 9631d908b0 Add a comment explaining an unavailable optimization.
llvm-svn: 174131
2013-02-01 00:49:06 +00:00
Bill Wendling 3f9fcd48a4 Remove one of the odious 'Raw' methods.
llvm-svn: 174130
2013-02-01 00:48:14 +00:00
Bill Wendling f1c94e3241 Use iterators instead of relying upon a bitmask of attributes to remove attributes from an AttrBuilder.
llvm-svn: 174123
2013-02-01 00:13:50 +00:00
Dan Gohman b3e2d3a638 Rewrite instsimplify's handling if icmp on pointer values to remove the
remaining use of AliasAnalysis concepts such as isIdentifiedObject to
prove pointer inequality.

@external_compare in test/Transforms/InstSimplify/compare.ll shows a simple
case where a noalias argument can be equal to a global variable address, and
while AliasAnalysis can get away with saying that these pointers don't alias,
instsimplify cannot say that they are not equal.

llvm-svn: 174122
2013-02-01 00:11:13 +00:00
Chandler Carruth 339468ece6 Fix another typo in the classof definitions that doesn't (currently)
have any effect. Spotted by Eli in review, thanks!!!

llvm-svn: 174121
2013-02-01 00:04:33 +00:00
Bill Wendling a91748602a Add iterators to the AttributeSet class so that we can access the Attributes in a nice way.
llvm-svn: 174120
2013-01-31 23:53:05 +00:00
Dan Gohman 995d40e1e2 An alloca can be equal to an argument. It can't *alias* an alloca, but it could
be equal, since there's nothing preventing a caller from correctly predicting
the stack location of an alloca.

llvm-svn: 174119
2013-01-31 23:49:33 +00:00
Chandler Carruth e5d8d0d64b Switch the code added in r173885 to use the new, shiny RTTI
infrastructure on MCStreamer to test for whether there is an
MCELFStreamer object available.

This is just a cleanup on the AsmPrinter side of things, moving ad-hoc
tests of random APIs to a direct type query. But the AsmParser
completely broken. There were no tests, it just blindly cast its
streamer to an MCELFStreamer and started manipulating it.

I don't have a test case -- this actually failed on LLVM's own
regression test suite. Unfortunately the failure only appears when the
stars, compilers, and runtime align to misbehave when we read a pointer
to a formatted_raw_ostream as-if it were an MCAssembler. =/

UBSan would catch this immediately.

Many thanks to Matt for doing about 80% of the debugging work here in
GDB, Jim for helping to explain how exactly to fix this, and others for
putting up with the hair pulling that ensued during debugging it.

llvm-svn: 174118
2013-01-31 23:43:14 +00:00
Chandler Carruth a983b4de7a 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.

llvm-svn: 174117
2013-01-31 23:43:12 +00:00
Bill Wendling 23804daad9 s/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descriptive of what it actually is.
llvm-svn: 174116
2013-01-31 23:38:01 +00:00
Chandler Carruth 30cfaa2578 Fix a copy/paste-o that got missed because 'check' doesn't build lto.
llvm-svn: 174115
2013-01-31 23:34:47 +00:00
Chandler Carruth de093ef8d6 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.

llvm-svn: 174113
2013-01-31 23:29:57 +00:00
Bill Wendling 1c7cc8ae90 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).

llvm-svn: 174110
2013-01-31 23:16:25 +00:00
Richard Smith f47dc0ba93 Regenerate configure to hopefully fix buildbot breakage. Oh how I love autoconf.
llvm-svn: 174108
2013-01-31 23:02:23 +00:00
NAKAMURA Takumi e1137a2058 Update AMDGPURegisterInfo::eliminateFrameIndex() corresponding to r174083.
llvm-svn: 174106
2013-01-31 22:55:51 +00:00
Richard Smith 6c26e74781 Add -Wno-nested-anon-types to -pedantic builds of LLVM. This Clang warning
catches uses of an extremely minor and widely-available C++ extension (which
every C++ compiler I could find supports, but EDG and Clang reject in strict
mode).

The diagnosed code pattern looks like this:

struct X {
  union {
    struct {
      int a;
      int b;
    } S;
  };
};

llvm-svn: 174103
2013-01-31 22:19:12 +00:00
Daniel Dunbar 38d3798b94 [lit] Add a test for internal shell execution behaviors.
llvm-svn: 174102
2013-01-31 22:15:20 +00:00
Daniel Dunbar f36e032c41 [lit] Change to raise InternalShellError for all command execution issues.
llvm-svn: 174101
2013-01-31 22:15:15 +00:00