Rui Ueyama [Fri, 2 Aug 2013 22:34:12 +0000 (22:34 +0000)]
[PECOFF] Remove special treatment of "--" option.
Thanks to Hans' patch (r187675), OptTable now handles "--", so we don't
need this code in LLD.
llvm-svn: 187683
Peter Collingbourne [Fri, 2 Aug 2013 22:29:40 +0000 (22:29 +0000)]
Make one of the AttributeSet ctors maintain the invariant that the
attribute list is ordered by index.
Differential Revision: http://llvm-reviews.chandlerc.com/D1265
llvm-svn: 187682
Rui Ueyama [Fri, 2 Aug 2013 22:27:15 +0000 (22:27 +0000)]
[PECOFF] Remove COFFDefinedFileAtom::originalOffset().
The aim of this patch is to reduce the dependency from COFFDefinedAtom
to COFF structs defined in llvm/Object/COFF.h. Currently many attributes
of the atom are computed in the atom. That provide a simple interface but
does not work well in some cases.
There are some cases that the same type atom is created from different
parts of a COFF file. One example is the BSS atom, which can be created
from the defined symbol in the .bss section or from the undefined symbol.
Computing attributes from different sources in the atom complicates the
code. We should compute it outside the atom.
In the next patch, I'll move more code from Atoms.h to ReaderCOFF.cpp.
llvm-svn: 187681
Bob Wilson [Fri, 2 Aug 2013 22:25:34 +0000 (22:25 +0000)]
Only use the Darwin linker's -export_dynamic option with supported versions.
Related to <rdar://problem/
14578094>.
llvm-svn: 187680
Hans Wennborg [Fri, 2 Aug 2013 22:24:50 +0000 (22:24 +0000)]
Re-commit r187637: "clang-cl: add more options"
> This adds a bunch of options to clang-cl. Notably, this includes
> all the options that get passed when doing a default build of a
> command-line project with msbuild.exe in Debug and Release modes,
> and I believe all flags from Reid's original patch.
The original commit was reverted in r187640 after it broke the Mac build.
This should now be fixed, by Clang r187668, LLVM r187675, and putting
a -- before %s in the test.
llvm-svn: 187679
Manuel Klimek [Fri, 2 Aug 2013 21:31:59 +0000 (21:31 +0000)]
Implement Allman style.
Patch by Frank Miller.
llvm-svn: 187678
Rui Ueyama [Fri, 2 Aug 2013 21:26:14 +0000 (21:26 +0000)]
[PECOFF] Handle .drectve section.
Summary:
The .drectve section contains linker command line options, and the linker is
expected to interpret them as if they were given via the command line. In this
patch, the command line parser in the driver is called from the object file
reader to parse the string.
I think this patch is important, because this is the first step towards mutable
TargetInfo. We had a discussion about that on llvm-commits mailing list before.
I haven't removed "const" from the function signature yet. Instead, I just use
cast to remove "const". This is a temporary aid for an experiment. If we don't
see any issue with this mutable TargetInfo appraoch, I'll change the function
signature, and rename the class LinkerContext from TargetInfo.
Reviewers: kledzik
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1246
llvm-svn: 187677
Manuel Klimek [Fri, 2 Aug 2013 21:24:09 +0000 (21:24 +0000)]
Fix crash when encountering alias templates in isDerivedFrom matches.
- pull out function to drill to the CXXRecordDecl from the type,
to allow recursive resolution
- make the analysis more robust by rather skipping values we don't
understand
llvm-svn: 187676
Hans Wennborg [Fri, 2 Aug 2013 21:20:27 +0000 (21:20 +0000)]
Option parsing: recognize the special -- token
Everything that comes after -- should be treated as a filename. This
enables passing in filenames that would otherwise be conflated with
command-line options.
This is especially important for clang-cl which supports options
starting with /, which are easily conflatable with Unix-style
path names.
Differential Revision: http://llvm-reviews.chandlerc.com/D1274
llvm-svn: 187675
Hal Finkel [Fri, 2 Aug 2013 21:13:42 +0000 (21:13 +0000)]
Fix invalid function pointers in bugpoint ExtractLoops
The ExtractLoops function tries to reduce the failing test case by extracting
one or more loops from the misoptimized piece of the program. In doing this,
ExtractLoops must keep the MiscompiledFunctions vector up-to-date by ensuring
that the pointers refer to functions in the current failing program.
Unfortunately, this is not trivial because:
- ExtractLoops is iterative, and there are several early exits (and the
MiscompiledFunctions vector must be consistent with the current program at
every non-fatal exit point).
- Several of the utility functions used by ExtractLoops (such as
TestOptimizer, some of which are called through the TestFn callback
parameter, and Linker::LinkModules) delete their inputs upon success.
This change adds several updates of the MiscompiledFunctions vector at
different points. The first is after the initial call to TestMergedProgram
which checks that the loop-extracted program still works. The second is after
the call to TestFn (TestOptimizer, for example). This function will delete its
inputs (which is why the existing ExtractLoops logic cloned the inputs first).
llvm-svn: 187674
Rui Ueyama [Fri, 2 Aug 2013 21:10:17 +0000 (21:10 +0000)]
[PECOFF] Return an error_code instead of calling report_fatal_error().
For an invalid input we should not call report_fatal_error(), because
when LLD is used as a library, we don't want to kill the whole app
because of a malformed input.
llvm-svn: 187673
Fariborz Jahanian [Fri, 2 Aug 2013 20:54:18 +0000 (20:54 +0000)]
ObjectiveC migrator: Add another family of factory
methods which can be migrated to instancetype.
llvm-svn: 187672
Joey Gouly [Fri, 2 Aug 2013 20:50:01 +0000 (20:50 +0000)]
Add a missing 'return' statement.
llvm-svn: 187671
Rui Ueyama [Fri, 2 Aug 2013 20:45:25 +0000 (20:45 +0000)]
Use report_fatal_error() instead of llvm_unreachable() to show broken input file error.
llvm-svn: 187670
Matt Arsenault [Fri, 2 Aug 2013 20:43:37 +0000 (20:43 +0000)]
Fix missing * making the C++ mode thing not work
llvm-svn: 187669
Hans Wennborg [Fri, 2 Aug 2013 20:16:22 +0000 (20:16 +0000)]
CC1: Only parse command-line options that have the CC1Option flag.
We already reject flags that don't have the CC1Option flag,
but we would previously do so after parsing the command-line
arguments.
Since the option parser now has a parameter for excluding options,
we should just use that instead.
Differential Revision: http://llvm-reviews.chandlerc.com/D1270
llvm-svn: 187668
Akira Hatanaka [Fri, 2 Aug 2013 19:23:33 +0000 (19:23 +0000)]
[mips] Expand vector truncating stores and extending loads.
llvm-svn: 187667
Joey Gouly [Fri, 2 Aug 2013 19:18:12 +0000 (19:18 +0000)]
[ARMv8] Add an assembler warning for the deprecated 'setend' instruction.
llvm-svn: 187666
Rui Ueyama [Fri, 2 Aug 2013 19:10:29 +0000 (19:10 +0000)]
[PECOFF] Remove an assertion that's too heavy.
llvm-svn: 187665
Rui Ueyama [Fri, 2 Aug 2013 18:40:50 +0000 (18:40 +0000)]
[PECOFF] Relocations now take into account the address which is stored at the relocation site
Patch by Ron Ofir.
llvm-svn: 187664
Nadav Rotem [Fri, 2 Aug 2013 18:40:24 +0000 (18:40 +0000)]
SLPVectorizer: Fix PR16777. PHInodes may use multiple extracted values that come from different blocks.
Thanks Alexey Samsonov.
llvm-svn: 187663
Matt Arsenault [Fri, 2 Aug 2013 18:33:34 +0000 (18:33 +0000)]
Teach EmitGEPOffset about address spaces
llvm-svn: 187662
Fariborz Jahanian [Fri, 2 Aug 2013 18:00:53 +0000 (18:00 +0000)]
ObjectiveC migrator: Fixes public buildbot failures,
in my previous patch which was reverted in r187657
llvm-svn: 187661
Matt Kopec [Fri, 2 Aug 2013 17:53:28 +0000 (17:53 +0000)]
Mark additional icc test failures as expected fail.
llvm-svn: 187660
Howard Hinnant [Fri, 2 Aug 2013 17:50:49 +0000 (17:50 +0000)]
debug mode for unordered_map. Also picked up a missing check and test in unordered_multimap. This wraps up debug mode for the unordered containers.
llvm-svn: 187659
Renato Golin [Fri, 2 Aug 2013 17:10:04 +0000 (17:10 +0000)]
Fixes ARM LNT bot from SLP change in O3
This patch fixes the multiple breakages on ARM test-suite after the SLP
vectorizer was introduced by default on O3. The problem was an illegal
vector type on ARMTTI::getCmpSelInstrCost() <3 x i1> which is not simple.
The guard protects this code from breaking (cause of the problems) but
doesn't fix the issue that is generating the odd vector in the first
place, which also needs to be investigated.
llvm-svn: 187658
Fariborz Jahanian [Fri, 2 Aug 2013 16:25:41 +0000 (16:25 +0000)]
revert patch I added in r187655. It still breaks public
buildbot.
llvm-svn: 187657
Carlo Kok [Fri, 2 Aug 2013 16:14:15 +0000 (16:14 +0000)]
Bugfix for making the DWARF debug strings and labels to code emitted as secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB (with fix for 64bits msvc)
llvm-svn: 187656
Fariborz Jahanian [Fri, 2 Aug 2013 16:00:08 +0000 (16:00 +0000)]
ObjectiveC migration. Check-in patch reverted in r187634.
Also removed check for "NS" prefix for class name.
llvm-svn: 187655
Rafael Espindola [Fri, 2 Aug 2013 15:31:35 +0000 (15:31 +0000)]
Convert last use of st_dev in clang.
llvm-svn: 187654
Evgeniy Stepanov [Fri, 2 Aug 2013 14:26:58 +0000 (14:26 +0000)]
[msan] Allocator statistics interface and malloc hooks.
llvm-svn: 187653
Tim Northover [Fri, 2 Aug 2013 11:38:46 +0000 (11:38 +0000)]
Remove rather oddly merged logic from AArch64 commit.
We seem to have ended up with both an inlined check of permitted NEON base
types and a call to a function.
Since the outer if was (I believe) strictly weaker than the one in the
function, there's no actual user-visible behaviour change, so no tests.
llvm-svn: 187652
Tim Northover [Fri, 2 Aug 2013 11:32:50 +0000 (11:32 +0000)]
Fix handling of CHECK-DAG combined with CHECK-NOT
Patch by Daniel Sanders.
llvm-svn: 187651
Daniel Jasper [Fri, 2 Aug 2013 11:01:15 +0000 (11:01 +0000)]
clang-format: Fix string breaking after "<<".
Before, clang-format would not break overly long string literals
following a "<<" with FormatStyle::AlwaysBreakBeforeMultilineStrings
being set.
llvm-svn: 187650
Duncan Sands [Fri, 2 Aug 2013 09:37:20 +0000 (09:37 +0000)]
Pacify GCC, which worries about falling off the end of the switch.
llvm-svn: 187649
Evgeniy Stepanov [Fri, 2 Aug 2013 09:09:02 +0000 (09:09 +0000)]
[msan] Fix unused function warning in the tests.
llvm-svn: 187648
Alexey Samsonov [Fri, 2 Aug 2013 09:06:39 +0000 (09:06 +0000)]
Assume UniqueID is zero for invalid PPRegion to fix uninitialized reads reported by MSan
llvm-svn: 187647
Alexey Samsonov [Fri, 2 Aug 2013 08:06:43 +0000 (08:06 +0000)]
Fix dereferencing end iterator in SimplifyCFG. Patch by Ye Mei.
llvm-svn: 187646
Rui Ueyama [Fri, 2 Aug 2013 05:25:31 +0000 (05:25 +0000)]
[PECOFF] A symbol with symbol with section number 0 and non-zero value represents a BSS atom.
llvm-svn: 187645
Craig Topper [Fri, 2 Aug 2013 05:10:31 +0000 (05:10 +0000)]
Fix indentation. No functional change.
llvm-svn: 187644
Rui Ueyama [Fri, 2 Aug 2013 05:04:06 +0000 (05:04 +0000)]
[PECOFF] Simplify COFFBSSAtom.
A instance of the class always represents a BSS atom, so we don't need
to look at the symbol or the section to retrieve its attributes.
llvm-svn: 187643
NAKAMURA Takumi [Fri, 2 Aug 2013 03:46:05 +0000 (03:46 +0000)]
Revert r187597, "Bugfix for making the DWARF debug strings and labels to code emitted as secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB."
It broke x86_64-win32 builder in llvm/test/DebugInfo.
llvm-svn: 187642
Eric Christopher [Fri, 2 Aug 2013 01:51:52 +0000 (01:51 +0000)]
Use @rpath for libraries rather than @executable_path on OSX.
Patch by Benjamin Scarlet!
llvm-svn: 187641
Hans Wennborg [Fri, 2 Aug 2013 01:29:28 +0000 (01:29 +0000)]
Revert r187537 "clang-cl: add more options"
It broke the "phase1 - sanity" buildbot. Reverting until
we can figure out what's going on.
And Eric says it broke all current Mac builds actually.
llvm-svn: 187640
Richard Smith [Fri, 2 Aug 2013 01:09:12 +0000 (01:09 +0000)]
When merging redeclaration chains across modules, if a declaration is visible
in one module but is only declared as a friend in another module, keep it
visible in the result of the merge.
This is incomplete on two axes:
1) Our handling of local extern declarations is basically broken (we put them
in the wrong decl context, and don't find them in redeclaration lookup, unless
they've previously been declared), and this results in them making friends
visible after a merge.
2) Eventually we'll need to mark that this has happened, and more carefully
check whether a declaration should be visible if it was only visible in some
of the modules in which it was declared. Fortunately it's rare for the
identifier namespace of a declaration to change along its redeclaration chain.
llvm-svn: 187639
Eric Christopher [Fri, 2 Aug 2013 00:49:44 +0000 (00:49 +0000)]
Temporarily revert "Debug Info Finder|Verifier: handle DbgLoc attached to
instructions." in an attempt to bring back some bots.
This reverts commit r187609.
llvm-svn: 187638
Hans Wennborg [Fri, 2 Aug 2013 00:30:15 +0000 (00:30 +0000)]
clang-cl: add more options
This adds a bunch of options to clang-cl. Notably, this includes
all the options that get passed when doing a default build of a
command-line project with msbuild.exe in Debug and Release modes,
and I believe all flags from Reid's original patch.
Differential Revision: http://llvm-reviews.chandlerc.com/D1264
llvm-svn: 187637
Howard Hinnant [Fri, 2 Aug 2013 00:26:35 +0000 (00:26 +0000)]
Ok, 3 major changes for debug mode in one commit:
1. I had been detecting and trapping iterator == and \!= among iterators
in different containers as an error. But the trapping itself is actually
an error.
Consider:
#include <iostream>
#include <vector>
#include <algorithm>
template <class C>
void
display(const C& c)
{
std::cout << "{";
bool first = true;
for (const auto& x : c)
{
if (\!first)
std::cout << ", ";
first = false;
std::cout << x;
}
std::cout << "}\n";
}
int
main()
{
typedef std::vector<int> V;
V v1 = {1, 3, 5};
V v2 = {2, 4, 6};
display(v1);
display(v2);
V::iterator i = std::find(v1.begin(), v1.end(), 1);
V::iterator j = std::find(v2.begin(), v2.end(), 2);
if (*i == *j)
i = j; // perfectly legal
// ...
if (i \!= j) // the only way to check
v2.push_back(*i);
display(v1);
display(v2);
}
It is legal to assign an iterator from one container to another of the
same type. This is required to work. One might want to test whether or
not such an assignment had been made. The way one performs such a check
is using the iterator's ==, \!= operator. This is a logical and necessary
function and does not constitute an error.
2. I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined.
This caused a problem in several of the libc++ tests.
Fixed.
3. There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that
std::basic_string is inoperable. std::basic_string uses __wrap_iterator
to implement its iterators. __wrap_iterator has been rigged up in debug
mode to support vector. But string hasn't been rigged up yet. This means
that one gets false positives when using std::string in debug mode. I've
upped std::string's priority in www/debug_mode.html.
llvm-svn: 187636
Matt Arsenault [Fri, 2 Aug 2013 00:10:44 +0000 (00:10 +0000)]
Teach InstructionSimplify about pointer address spaces
llvm-svn: 187635
Rafael Espindola [Fri, 2 Aug 2013 00:01:14 +0000 (00:01 +0000)]
Revert "ObjectiveC migrator. Migrate to instancetype return type for mehods with certain prefix selector matching their class names' suffix."
This reverts commit r187626.
It is breaking the bots.
llvm-svn: 187634
Rafael Espindola [Thu, 1 Aug 2013 23:56:42 +0000 (23:56 +0000)]
Revert "If -fslp-vectorize or -fno-slp-vectorize are given, honor this selection. If no flag is given, enable it for -O3."
This reverts commit r187630.
Looks like it is breaking the bots.
llvm-svn: 187633
Akira Hatanaka [Thu, 1 Aug 2013 23:14:16 +0000 (23:14 +0000)]
[mips] Make load/store accumulator pseudo instructions codeGenOnly. Also,
remove lines that are setting DecoderNamespace for pseudo atomic instructions.
No intended functionality change.
llvm-svn: 187632
Daniel Jasper [Thu, 1 Aug 2013 23:13:03 +0000 (23:13 +0000)]
clang-format: Operator precendence in ObjC method exprs.
Patch (mostly) by Adam Strzelecki. Thanks!
Before:
[self aaaaaa:
bbbbbbbbbbbbb
aaaaaaaaaa:
bbbbbbbbbbbbbbbbb
aaaaa:
bbbbbbbbbbb +
bbbbbbbbbbbb aaaa:bbb];
After:
[self aaaaaa:
bbbbbbbbbbbbb
aaaaaaaaaa:
bbbbbbbbbbbbbbbbb
aaaaa:
bbbbbbbbbbb +
bbbbbbbbbbbb
aaaa:bbb];
This fixes llvm.org/PR16150.
llvm-svn: 187631
Nadav Rotem [Thu, 1 Aug 2013 22:56:53 +0000 (22:56 +0000)]
If -fslp-vectorize or -fno-slp-vectorize are given, honor this selection. If no flag is given, enable it for -O3.
llvm-svn: 187630
Matt Arsenault [Thu, 1 Aug 2013 22:42:18 +0000 (22:42 +0000)]
Teach getOrEnforceKnownAlignment about address spaces
llvm-svn: 187629
Nadav Rotem [Thu, 1 Aug 2013 22:41:58 +0000 (22:41 +0000)]
Move the optlevel check to the frontend.
llvm-svn: 187628
Fariborz Jahanian [Thu, 1 Aug 2013 22:29:32 +0000 (22:29 +0000)]
ObjectiveC migrator. Migrate to instancetype return type
for mehods with certain prefix selector matching their class names'
suffix.
llvm-svn: 187626
Jordan Rose [Thu, 1 Aug 2013 22:16:36 +0000 (22:16 +0000)]
[analyzer] Don't process autorelease counts in synthesized function bodies.
We process autorelease counts when we exit functions, but if there's an
issue in a synthesized body the report will get dropped. Just skip the
processing for now and let it get handled when the caller gets around to
processing autoreleases.
(This is still suboptimal: objects autoreleased in the caller context
should never be warned about when exiting a callee context, synthesized
or not.)
Second half of <rdar://problem/
14611722>
llvm-svn: 187625
Jordan Rose [Thu, 1 Aug 2013 22:16:30 +0000 (22:16 +0000)]
[analyzer] Silently drop all reports within synthesized bodies.
Much of our diagnostic machinery is set up to assume that the report
end path location is valid. Moreover, the user may be quite confused
when something goes wrong in our BodyFarm-synthesized function bodies,
which may be simplified or modified from the real implementations.
Rather than try to make this all work somehow, just drop the report so
that we don't try to go on with an invalid source location.
Note that we still handle reports whose /paths/ go through invalid
locations, just not those that are reported in one.
We do have to be careful not to lose warnings because of this.
The impetus for this change was an autorelease being processed within
the synthesized body, and there may be other possible issues that are
worth reporting in some way. We'll take these as they come, however.
<rdar://problem/
14611722>
llvm-svn: 187624
Carlo Kok [Thu, 1 Aug 2013 22:15:34 +0000 (22:15 +0000)]
fix for LLVM debug info on llvm-mips-linux where the label name uses % instead of L as a prefix.
llvm-svn: 187623
Daniel Jasper [Thu, 1 Aug 2013 22:05:00 +0000 (22:05 +0000)]
clang-format: Don't break empty 2nd operand of ternary expr.
Before:
some_quite_long_variable_name_ptr
?
: argv[9] ? ptr : argv[8] ? : argv[7] ? ptr : argv[6];
After:
some_quite_long_variable_name_ptr
?: argv[9] ? ptr : argv[8] ?: argv[7] ? ptr : argv[6];
Patch by Adam Strzelecki, thank you!!
This fixed llvm.org/PR16758.
llvm-svn: 187622
Jason Molenda [Thu, 1 Aug 2013 21:50:20 +0000 (21:50 +0000)]
Re-enable fast stepping for arm targets. The issue being worked
around was fixed in llvm commit r186846.
<rdar://problem/
14489274>
llvm-svn: 187620
Rafael Espindola [Thu, 1 Aug 2013 21:42:11 +0000 (21:42 +0000)]
Use llvm::sys::fs::UniqueID for windows and unix.
This unifies the unix and windows versions of FileManager::UniqueDirContainer
and FileManager::UniqueFileContainer by using UniqueID.
We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we
want to be able to construct fake ones, and file_status has different members
on unix and windows.
What the patch does is:
* Record only the information that clang is actually using.
* Use llvm::sys::fs::status instead of stat and fstat.
* Use llvm::sys::fs::UniqueID
* Delete the old windows versions of UniqueDirContainer and
UniqueFileContainer since the "unix" one now works on windows too.
llvm-svn: 187619
Bill Wendling [Thu, 1 Aug 2013 21:42:05 +0000 (21:42 +0000)]
Use function attributes to indicate that we don't want to realign the stack.
Function attributes are the future! So just query whether we want to realign the
stack directly from the function instead of through a random target options
structure.
llvm-svn: 187618
Bill Wendling [Thu, 1 Aug 2013 21:41:02 +0000 (21:41 +0000)]
Use function attributes to indicate if we don't want to realign the stack.
llvm-svn: 187617
Rafael Espindola [Thu, 1 Aug 2013 21:36:02 +0000 (21:36 +0000)]
Expose that the unique file ID has a device and a file component.
The use of sd_dev and st_ino has reached libclang, so expose the two components
in UniqueID so that we can use it in clang.
llvm-svn: 187616
Daniel Malea [Thu, 1 Aug 2013 21:18:16 +0000 (21:18 +0000)]
Fixed the Intel-syntax X86 disassembler to respect the (existing) option for hexadecimal immediates, to match AT&T syntax. This also brings a new option for C-vs-MASM-style hex.
Patch by Richard Mitton
Reviewed: http://llvm-reviews.chandlerc.com/D1243
llvm-svn: 187614
Reed Kotler [Thu, 1 Aug 2013 21:17:53 +0000 (21:17 +0000)]
Fix some issues with Mips16 floating when certain intrinsics are present.
This is actually an LLVM bug in the way it generates signatures for these
when soft float is enabled. For example, floor ends up having the signature
of int64(int64). The signature part is not the same as where the actual
parameter types are recorded, and those ARE of course int64(int64) when
soft float is enabled. (Yes, Mips16 hard float uses soft float but with
different runtime rounes but then has to interoperate with Mips32 using
normal floating point). This logic will eventually be moved to the
Mips16HardFloat pass so it's not worth sorting out these issues in LLVM
since nobody but Mips16 cares about these signatures, as far as I know,
and even I won't eventually either.
llvm-svn: 187613
David Blaikie [Thu, 1 Aug 2013 20:57:40 +0000 (20:57 +0000)]
DebugInfo: Don't prefer declarations over definitions in -flimit-debug-info in C
Without an ODR, the -flimit-debug-info debug info size optimization of
emitting declarations for fully defined types when only a declaration is
needed by the TU, is incorrect. Emit the full definition whenever it's
available in non-C++.
llvm-svn: 187611
Carlo Kok [Thu, 1 Aug 2013 20:53:57 +0000 (20:53 +0000)]
ARM/Hexagon testcases can't compile x86 only testcase. Reverting change to testcase & fixing check for all.
llvm-svn: 187610
Manman Ren [Thu, 1 Aug 2013 20:52:39 +0000 (20:52 +0000)]
Debug Info Finder|Verifier: handle DbgLoc attached to instructions.
Also remove checking of llvm.dbg.sp since it is not used in generating dwarf.
Current state of Finder:
DebugInfoFinder tries to list all debug info MDNodes used in a module. To
list debug info MDNodes used by an instruction, DebugInfoFinder provides
processDeclare, processValue and processLocation to handle DbgDeclareInst,
DbgValueInst and DbgLoc attached to instructions. processModule will go
through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes
used by the CUs.
TODO:
1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We
need to add a list of variables that are used by DbgDeclareInst and
DbgValueInst.
2> MDString fields should be null or isa<MDString> and MDNode fields should be
null or isa<MDNode>. We currently use empty string or int 0 to represent null.
3> Go though Verify functions and make sure that they check field types.
4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each
testing case has a llvm.dbg.cu.
llvm-svn: 187609
David Blaikie [Thu, 1 Aug 2013 20:31:40 +0000 (20:31 +0000)]
DebugInfo: Emit template arguments for limited types used for context.
We emit definitions with no members when a nested type is
referenced/required (GCC does the same, to be fair) but failed to attach
the template arguments in such a case.
llvm-svn: 187608
David Blaikie [Thu, 1 Aug 2013 20:30:22 +0000 (20:30 +0000)]
DebugInfo: Emit definitions for types with no members.
The absence of members was a poor/incorrect proxy for "is definition".
llvm-svn: 187607
Carlo Kok [Thu, 1 Aug 2013 20:17:37 +0000 (20:17 +0000)]
change the inlinefnlocalvar testcase so it uses a triple that's not coff (doesn't seem to matter for the testcase itself, what it tests isn't triple specific), as coff has a slightly different way of emitting what it checks for.
llvm-svn: 187604
Daniel Malea [Thu, 1 Aug 2013 20:03:36 +0000 (20:03 +0000)]
Disable test on Mac OS X due to llvm.org/pr16769
llvm-svn: 187603
Hans Wennborg [Thu, 1 Aug 2013 19:46:33 +0000 (19:46 +0000)]
Options.td: O0 and O4 are not Joined options
(I'm not sure how to test this because the Driver will still accept
e.g. "-O4foo", but it goes in the catch-all -O option instead of -O4.)
llvm-svn: 187602
Bob Wilson [Thu, 1 Aug 2013 19:29:26 +0000 (19:29 +0000)]
Temporarily xfail a test that breaks on OS X when building with LTO.
This is another case where internalize hides a symbol that is needed by
a loadable module. I am currently investigating a proper fix but this patch
will get our buildbot to pass in the meantime. <rdar://problem/
14578094>
llvm-svn: 187601
Ashok Thirumurthi [Thu, 1 Aug 2013 18:52:01 +0000 (18:52 +0000)]
Updates TestLongjump to ensure that compiler optimizations don't affect the
mapping of source to assembly so that the same test script can be used
with more compilers.
Patch by Andy Kaylor!
Also marks the LLDB test of template parameters as xfail on icc.
llvm-svn: 187600
Michael Sartain [Thu, 1 Aug 2013 18:51:08 +0000 (18:51 +0000)]
Fix Linux Host::GetCurrentThreadID() to return real tid (not pthread_t).
This fixes threadname logging (--thread-name)
Add "-t" to TestLogging.py script to enable threadsafe and disable threadname logging
llvm-svn: 187599
Sean Silva [Thu, 1 Aug 2013 18:42:28 +0000 (18:42 +0000)]
Update incorrect file headers.
One of these was spotted in review by Rafael.
llvm-svn: 187598
Carlo Kok [Thu, 1 Aug 2013 18:38:14 +0000 (18:38 +0000)]
Bugfix for making the DWARF debug strings and labels to code emitted as secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB.
fixes Bug 16249 - LLVM generates broken debug info on Windows
llvm-svn: 187597
Nadav Rotem [Thu, 1 Aug 2013 18:28:23 +0000 (18:28 +0000)]
Enable the SLP-vectorizer by default
llvm-svn: 187596
Nadav Rotem [Thu, 1 Aug 2013 18:28:15 +0000 (18:28 +0000)]
Only enable SLP-vectorization on O3 builds.
llvm-svn: 187595
David Blaikie [Thu, 1 Aug 2013 18:23:24 +0000 (18:23 +0000)]
Reduce a variable's scope (no functionality change)
llvm-svn: 187594
Howard Hinnant [Thu, 1 Aug 2013 18:17:34 +0000 (18:17 +0000)]
Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can
also define _MSC_VER, and MSVCRT is not necessarily the only C runtime,
these macros should not be used interchangeably.
This patch divides all Windows-related bits into the aforementioned
categories. Two new macros are introduced:
- _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using
_MSC_VER, excluding Clang.
- _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default
when _WIN32 is defined.
This leaves _WIN32 for code using the Windows API.
This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF.
Nico, please prepare a patch for CREDITS.TXT, thanks.
llvm-svn: 187593
Daniel Jasper [Thu, 1 Aug 2013 18:17:13 +0000 (18:17 +0000)]
Simplify git-clang-format by using new -lines option.
Patch by Mark Lodato. Thank you!
llvm-svn: 187592
Simon Atanasyan [Thu, 1 Aug 2013 18:04:07 +0000 (18:04 +0000)]
Pass -G argument to cmake with the same generator's name as used for the
initial cmake invocation.
Patch reviewed by Reid Kleckner.
llvm-svn: 187591
Stefanus Du Toit [Thu, 1 Aug 2013 17:59:20 +0000 (17:59 +0000)]
Allow test categories to be skipped.
This adds a new parameter, --skip-category, that can be used to list
categories that should be skipped. For example, to run all tests except for
Objective-C ones, one can now write:
./dotest.py --skip-category objc [...]
llvm-svn: 187590
Daniel Jasper [Thu, 1 Aug 2013 17:58:23 +0000 (17:58 +0000)]
Teach clang-format to understand static_asserts better.
Before:
template <bool B, bool C>
class A {
static_assert(B &&C, "Something is wrong");
};
After:
template <bool B, bool C>
class A {
static_assert(B && C, "Something is wrong");
};
(Note the spacing around '&&'). Also change the identifier table to always
understand all C++11 keywords (which seems like the right thing to do).
llvm-svn: 187589
Joey Gouly [Thu, 1 Aug 2013 17:54:08 +0000 (17:54 +0000)]
Fix typo in comment.
Thanks Artyom Skrobov!
llvm-svn: 187588
Howard Hinnant [Thu, 1 Aug 2013 17:29:28 +0000 (17:29 +0000)]
Taking another swing at correctly optimizing fill_n.
llvm-svn: 187587
David Majnemer [Thu, 1 Aug 2013 17:26:42 +0000 (17:26 +0000)]
AST: Treat inline function declarations in -fms-compatibility as if it were in C++ when in C mode
This essentially fixes PR16766.
llvm-svn: 187586
Matt Kopec [Thu, 1 Aug 2013 17:22:24 +0000 (17:22 +0000)]
Update failing tests on Linux for clang and gcc to only fail on Linux instead of all platforms.
Thanks Stefanus!
llvm-svn: 187585
Robert Lytton [Thu, 1 Aug 2013 17:17:59 +0000 (17:17 +0000)]
remove executable permission from IntrinsicsXCore.td
llvm-svn: 187584
Hans Wennborg [Thu, 1 Aug 2013 16:21:57 +0000 (16:21 +0000)]
Options: Use AliasArgs for -O -> -O2 translation.
This way we can do the translation in the .td file rather than manually.
llvm-svn: 187583
Tom Stellard [Thu, 1 Aug 2013 15:23:42 +0000 (15:23 +0000)]
R600: Add 64-bit float load/store support
* Added R600_Reg64 class
* Added T#Index#.XY registers definition
* Added v2i32 register reads from parameter and global space
* Added f32 and i32 elements extraction from v2f32 and v2i32
* Added v2i32 -> v2f32 conversions
Tom Stellard:
- Mark vec2 operations as expand. The addition of a vec2 register
class made them all legal.
Patch by: Dmitry Cherkassov
Signed-off-by: Dmitry Cherkassov <dcherkassov@gmail.com>
llvm-svn: 187582
Tom Stellard [Thu, 1 Aug 2013 15:23:31 +0000 (15:23 +0000)]
R600: Use 64-bit alignment for 64-bit kernel arguments
llvm-svn: 187581
Tom Stellard [Thu, 1 Aug 2013 15:23:26 +0000 (15:23 +0000)]
R600/SI: Custom lower i64 ZERO_EXTEND
llvm-svn: 187580
Sergey Matveev [Thu, 1 Aug 2013 14:57:07 +0000 (14:57 +0000)]
[lsan] Add leak_check_at_exit flag.
We needed a way to tell LSan to invoke leak checking only if __do_leak_check()
is called explicitly. This can now be achieved by setting
leak_check_at_exit=false.
llvm-svn: 187578
Daniel Jasper [Thu, 1 Aug 2013 13:46:58 +0000 (13:46 +0000)]
clang-format: Improve line breaks in @property.
Before:
@property(nonatomic, assign,
readonly) NSString *looooooooooooooooooooooooooooongName;
After:
@property(nonatomic, assign, readonly)
NSString *looooooooooooooooooooooooooooongName;
llvm-svn: 187577