Commit Graph

173908 Commits

Author SHA1 Message Date
Saleem Abdulrasool acd0338c61 ARM: fix WoA PEI instruction selection
The ARM::BLX instruction is an ARM mode instruction.  The Windows on ARM target
is limited to Thumb instructions.  Correctly use the thumb mode tBLXr
instruction.  This would manifest as an errant write into the object file as the
instruction is 4-bytes in length rather than 2.  The result would be a corrupted
object file that would eventually result in an executable that would crash at
runtime.

llvm-svn: 208152
2014-05-07 03:03:27 +00:00
Justin Bogner d968717126 llvm-cov: Document --no-output in the command guide
llvm-svn: 208151
2014-05-07 02:33:58 +00:00
Richard Smith 3d23c42029 If an instantiation of a template is required to be a complete type, check
whether the definition of the template is visible rather than checking whether
the instantiated definition happens to be in an imported module.

llvm-svn: 208150
2014-05-07 02:25:43 +00:00
Justin Bogner cf27e1b996 llvm-cov: Handle missing source files as GCOV does
If the source files referenced by a gcno file are missing, gcov
outputs a coverage file where every line is simply /*EOF*/.  This also
occurs for lines in the coverage that are past the end of a file that
is found.

This change mimics gcov.

llvm-svn: 208149
2014-05-07 02:11:23 +00:00
Justin Bogner 1a18d7caa3 llvm-cov: Implement --no-output
In gcov, there's a -n/--no-output option, which disables the writing
of any .gcov files, so that it emits only the summary info on stdout.
This implements the same behaviour in llvm-cov.

llvm-svn: 208148
2014-05-07 02:11:18 +00:00
Yunzhong Gao e185d28862 Clean up some existing keyword tests in the test/Lexer directory by using the
pre-defined __is_identifier() macro.

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

llvm-svn: 208147
2014-05-07 01:58:02 +00:00
Kaelyn Takata 50c4ffcca7 Try harder to ensure a strict weak ordering of overload candidates that
have arity mismatches.

llvm-svn: 208146
2014-05-07 00:43:38 +00:00
Rui Ueyama d6a0604180 Trivial simplification
llvm-svn: 208145
2014-05-07 00:04:48 +00:00
Rui Ueyama 3608609339 Expand nested input elements.
Previously only the toplevel elements were expanded by expandElements().
Now we recursively call getReplacements() to expand input elements even
if they are in, say, in a group.

llvm-svn: 208144
2014-05-06 23:52:19 +00:00
Argyrios Kyrtzidis dff3ef80bb [Support/MemoryBuffer] Remove the assertion that the file size did not shrink.
This can happen in practice with the user changing files and we can recover from it.

llvm-svn: 208143
2014-05-06 23:30:56 +00:00
Argyrios Kyrtzidis 37b7b2aefc Rename "secondary initializer" -> "convenience initializer" in the warnings, which is a more correct and consistent term.
llvm-svn: 208142
2014-05-06 23:24:16 +00:00
Nico Weber ba8a99cf77 Fix ASan init function detection after clang r208128.
llvm-svn: 208141
2014-05-06 23:17:26 +00:00
David Majnemer 3b3bdb5169 AST: Update reference temporary mangling
Summary:
Update our mangling to match the discussion on cxx-abi-dev.

This involves using a seq-id instead of an optional number.

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 208140
2014-05-06 22:49:16 +00:00
Rafael Espindola 8d8f100c57 Special case aliases in GlobalValue::getSection.
This is similar to the getAlignment patch, but is done just for
completeness. It looks like we never call getSection on an alias. All the
tests still pass if the if is replaced with an assert.

llvm-svn: 208139
2014-05-06 22:44:30 +00:00
Nick Lewycky 0c4833f07e Add testcase for r208062.
llvm-svn: 208138
2014-05-06 22:28:58 +00:00
Andrew Trick d0d8cb1d21 Update an embarassing out-of-date comment.
llvm-svn: 208137
2014-05-06 22:18:43 +00:00
Tobias Grosser cfc57bb6e3 tblgen: Modularize the diagnostic emitter
Replace a large monolitic function, with per-table functions which all nicely
fit on my screen. I also added documentation to each function that describes
what kind of tables are generated and which information is contained and
switched to range based for loops. Finally, I run clang-format over the moved
code.

I spent a significant amount of time to understand this code when reasoning
about possible extensions to the diagnostic interface to support 'remark'
diagnostics. This change will definitely help such an implementation, but
already by itself it will save other people a lot of time when trying to
understand this functionality.

Even though the patch touches the full function, it is mostly mechanical. No
functional change intended. The generated tblgen files are identical.

llvm-svn: 208136
2014-05-06 22:06:56 +00:00
Jonathan Roelofs 40e9842854 On single threaded systems, turn mutexes into nops
http://reviews.llvm.org/D3386

llvm-svn: 208135
2014-05-06 21:30:56 +00:00
Eric Christopher 9c928478f4 Use a range based for loop for the SubtargetFeatures print function.
llvm-svn: 208132
2014-05-06 21:20:29 +00:00
David Blaikie 9dabbf6228 Revert "Try simplifying LexicalScopes ownership again."
Speculatively reverting due to a suspicious failure on a Windows
buildbot.

This reverts commit 10c37a012ea11596d44cd9059fe09c959caf30c8.

llvm-svn: 208131
2014-05-06 21:07:17 +00:00
Eric Christopher 0e6f41c659 Fix odd formatting that snuck into last patch.
llvm-svn: 208130
2014-05-06 21:04:27 +00:00
Joerg Sonnenberger 818e725158 If a function needs a frame pointer, but r11 (aka fp) has not been used,
remove it from the list of unspilled registers. Otherwise the following
attempt to keep the stack aligned by picking an extra GPR register to
spill will not work as it picks up r11.

llvm-svn: 208129
2014-05-06 20:43:01 +00:00
Nico Weber bdc969839a Include translation unit filename in global ctor symbol names.
This makes it easier to see where a global ctor comes from, and it also makes
ASan's init order analyzer output easier to understand.  gcc does this too,
but only in -fPIC mode for some reason.  Don't do this for constructors with
explicit init priority.

Also prepend "sub_" before the 'I', that way regular constructors stay
lexicographically after symbols with init priority (because
ord('s') > ord('I')).  gold seems to ignore the name of constructor symbols,
and ld only looks at the symbol if it includes an init priority, which this
patch doesn't change.

Before: __GLOBAL_I_a
Now: __GLOBAL_sub_I_myfile.cc
llvm-svn: 208128
2014-05-06 20:32:45 +00:00
Eric Christopher dc5072d60e ArrayRef-ize the Feature and Processor tables for SubtargetFeatures.
This removes arguments passed everywhere and allows the use of
standard iteration over lists.
Should be no functional change.

llvm-svn: 208127
2014-05-06 20:23:04 +00:00
Reid Kleckner 118e1bf862 Copy the full TailCallKind in CallInst::clone_impl
Split from the musttail inliner change.  This will be covered by an opt
test when the inliner change lands.

llvm-svn: 208126
2014-05-06 20:08:20 +00:00
Rui Ueyama 0d85dbfce0 Tests no longer uses getNextInputElement, so make it private.
llvm-svn: 208124
2014-05-06 19:32:54 +00:00
Rui Ueyama 2fa41d1817 Add a test for notifyProgress().
llvm-svn: 208123
2014-05-06 19:26:21 +00:00
Diego Novillo dd49157db1 Do not make -pass-remarks additive.
Summary:
When I initially introduced -pass-remarks, I thought it would be a
neat idea to make it additive. So, if one used it as:

$ llc -pass-remarks=inliner --pass-remarks=loop.*

the compiler would build the regular expression '(inliner)|(loop.*)'.

The more I think about it, the more I regret it. This is not how
other flags work. The standard semantics are right-to-left overrides.

This is how clang interprets -Rpass. And I think the two should be
compatible in this respect.

Reviewers: qcolombet

Subscribers: llvm-commits

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

llvm-svn: 208122
2014-05-06 19:14:00 +00:00
Rui Ueyama aa30ccffa8 Remove unused variable.
llvm-svn: 208121
2014-05-06 19:11:39 +00:00
Rui Ueyama b51711b356 Fix copypaste error.
llvm-svn: 208120
2014-05-06 19:05:14 +00:00
Rui Ueyama b12dcb6095 s/My/Test/ as these classes are for tests.
llvm-svn: 208119
2014-05-06 19:01:56 +00:00
Rui Ueyama fd5c70d0ec Make the test even more readable.
llvm-svn: 208118
2014-05-06 18:58:24 +00:00
Greg Clayton c62338e89d control-D on empty line to quit lldb stopped working in Release builds on MacOSX.
<rdar://problem/16822217>

llvm-svn: 208117
2014-05-06 18:54:53 +00:00
Rui Ueyama 48a1727e6f Simplify unit test code.
llvm-svn: 208116
2014-05-06 18:41:12 +00:00
Benjamin Kramer 1625bfccbe TTI: Estimate @llvm.fmuladd cost as fmul + fadd when FMA's aren't legal on the target.
llvm-svn: 208115
2014-05-06 18:36:23 +00:00
David Blaikie 483a9da598 Reapply: DebugInfo: Emit the definition of enums when the definition preceeds the declaration and initial use.
Reverting r208106 to reapply r208065 with a fix for the regression. The
issue was that the enum tried to be built even if the declaration hadn't
been constructed for debug info - presenting problems for enum templates
and typedefs of enums with names for linkage purposes.

Original commit message:

This regressed a little further 208055 though it was already a little
broken.

While the requiresCompleteType optimization should be implemented here.
Future (possibly near future) work.

llvm-svn: 208114
2014-05-06 18:35:21 +00:00
Rui Ueyama d976941704 Remove meaningless return value in test.
llvm-svn: 208112
2014-05-06 18:27:37 +00:00
Rui Ueyama 27169ce309 Replace copypasta with function calls to make tests intelligible.
llvm-svn: 208111
2014-05-06 18:24:27 +00:00
Nico Weber 7ce830bb67 Fix leak in ObjCSelfInitChecker, found by LSan.
BugReport doesn't take ownership of the bug type, so let the checker own the
the bug type.  (Requires making the bug type mutable, which is icky, but which
is also what other checkers do.)

llvm-svn: 208110
2014-05-06 17:33:42 +00:00
Rui Ueyama 1fe682cf37 Don't return value rather than always returning true.
addInputElement() never fails, and no one checks its return value
except tests. Let's simplify the signature.

llvm-svn: 208109
2014-05-06 17:33:14 +00:00
Nico Weber 5f8116ba46 Fix a leak found by LSan: ConsumedBlockInfo owns its StateMapsArray entries.
(I tried converting StateMapsArray to a vector<unique_ptr> and changing the
types of getInfo() and addInfo() to take unique_ptrs.  This mostly worked,
except for the three-argument form of addInfo() which I found confusing enough
that I went with this simpler fix for now.)

llvm-svn: 208108
2014-05-06 17:18:03 +00:00
Andrea Di Biagio c14ccc9184 [X86] Improve the lowering of BITCAST dag nodes from type f64 to type v2i32 (and vice versa).
Before this patch, the backend always emitted a store+load sequence to
bitconvert from f64 to i64 the input operand of a ISD::BITCAST dag node that
performed a bitconvert from type MVT::f64 to type MVT::v2i32. The resulting
i64 node was then used to build a v2i32 vector.

With this patch, the backend now produces a cheaper SCALAR_TO_VECTOR from
MVT::f64 to MVT::v2f64. That SCALAR_TO_VECTOR is then followed by a "free"
bitcast to type MVT::v4i32. The elements of the resulting
v4i32 are then extracted to build a v2i32 vector (which is illegal and
therefore promoted to MVT::v2i64).

This is in general cheaper than emitting a stack store+load sequence
to bitconvert the operand from type f64 to type i64.

llvm-svn: 208107
2014-05-06 17:09:03 +00:00
David Blaikie 29020cc571 Revert "DebugInfo: Emit the definition of enums when the definition preceeds the declaration and initial use."
This is breaking the compiler-rt build. Reverting while I
investigate/fix.

This reverts commit r208065.

llvm-svn: 208106
2014-05-06 17:02:15 +00:00
Tilmann Scheller e914bc8d46 Add driver support for AArch64 Fedora.
Reviewed by Eric Christopher.

llvm-svn: 208105
2014-05-06 16:58:14 +00:00
Renato Golin c7aea40ec6 Implememting named register intrinsics
This patch implements the infrastructure to use named register constructs in
programs that need access to specific registers (bare metal, kernels, etc).

So far, only the stack pointer is supported as a technology preview, but as it
is, the intrinsic can already support all non-allocatable registers from any
architecture.

llvm-svn: 208104
2014-05-06 16:51:25 +00:00
Rafael Espindola 52dc5d828f Special case aliases in GlobalValue::getAlignment.
An alias has the address of what it points to, so it also has the same
alignment.

This allows a few optimizations to see past aliases for free.

llvm-svn: 208103
2014-05-06 16:48:58 +00:00
Eric Christopher a9f3a5cb37 Have the SubtargetFeature help routine just not return a number and
fall back to the normal path without a cpu. While doing this fix
llc to just exit when we don't have a module to process instead of
asserting.

llvm-svn: 208102
2014-05-06 16:29:50 +00:00
Rui Ueyama b340f0117c Remove a method that no one is using.
llvm-svn: 208101
2014-05-06 16:22:04 +00:00
Jordan Rose b5d2dc2e89 Update comment for ObjCImplementationDecl's handling of instance variables.
No functionality change.

llvm-svn: 208099
2014-05-06 16:07:54 +00:00
Bob Wilson c16b7040e3 Add some details to the llvm-cov documentation. <rdar://problem/15819496>
llvm-svn: 208098
2014-05-06 15:58:06 +00:00