Commit Graph

163740 Commits

Author SHA1 Message Date
Alexander Kornienko a818200efb Fixed a typo
llvm-svn: 197142
2013-12-12 10:08:54 +00:00
Alexander Kornienko 06ff5a7235 Fix the usage of the CommonOptionsParser ctor changed in r197139.
llvm-svn: 197141
2013-12-12 10:01:39 +00:00
Rui Ueyama d68304eeee [PECOFF] Move a utility function used in a pass to Pass.cpp.
The file currently has only one function. Function that is useful both for
IdataPass and EdataPass will be added to that file.

llvm-svn: 197140
2013-12-12 10:01:14 +00:00
Alexander Kornienko b5e774eb2c Filter-out irrelevant command-line options in CommonOptionsParser.
Summary:
Leave only -help, -version and options from the specified category.
Updated clang-check and clang-tidy. As clang-tidy is in a separate repository,
here's the diff:

  Index: tools/extra/clang-tidy/tool/ClangTidyMain.cpp
  ===================================================================
  --- tools/extra/clang-tidy/tool/ClangTidyMain.cpp       (revision 197024)
  +++ tools/extra/clang-tidy/tool/ClangTidyMain.cpp       (working copy)
  @@ -39,7 +39,7 @@
   // FIXME: Add option to list name/description of all checks.
   
   int main(int argc, const char **argv) {
  -  CommonOptionsParser OptionsParser(argc, argv);
  +  CommonOptionsParser OptionsParser(argc, argv, ClangTidyCategory);
   
     SmallVector<clang::tidy::ClangTidyError, 16> Errors;
     clang::tidy::runClangTidy(Checks, OptionsParser.getCompilations(),

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits, revane, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D2379

llvm-svn: 197139
2013-12-12 09:59:42 +00:00
Alexander Kornienko 3a33f0292b Implemented GNU-style formatting for compound statements.
Summary:
Added BraceBreakingStyle::BS_GNU. I'm not sure about the correctness of
static initializer formatting, but compound statements should be fine.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D2372

llvm-svn: 197138
2013-12-12 09:49:52 +00:00
Rui Ueyama a92e2311bb [PECOFF] Replace DLLNameAtom with COFFStringAtom.
DLLNameAtom is an atom whose content is a string. IdataAtom is not going to
be the only place we need such atom, so I want to generalize it.

llvm-svn: 197137
2013-12-12 08:53:46 +00:00
Gabor Greif 5fde43bf2e typo in comment
llvm-svn: 197136
2013-12-12 08:00:34 +00:00
Hao Liu 46a10eec28 [AArch64]Fix the problem that AArch64 backend fails to select scalar_to_vector of vector types having more than one element.
llvm-svn: 197135
2013-12-12 07:36:26 +00:00
Rui Ueyama 5a10da129f [PECOFF] Rename IdataPassFile and move it to Atoms.h.
I'm planning to create a new pass for the DLL export table, and I want to use
the class both from IdataPass and the new pass, EdataPass. So move the class to
a common place.

llvm-svn: 197132
2013-12-12 06:58:00 +00:00
NAKAMURA Takumi 39b270225d c-arcmt-test/Makefile: Fixup for LDFLAGS=-static on cygming, corresponding to r197116.
llvm-svn: 197129
2013-12-12 06:37:12 +00:00
Ted Kremenek c152c528b0 Add more test cases for 'objc_protocol_requires_explicit_implementation'.
llvm-svn: 197128
2013-12-12 06:20:42 +00:00
Richard Smith db05cd37a1 PR17602: check accessibility when performing an implicit derived-to-base
conversion on the LHS of a .* or ->*. Slightly improve diagnostics in case
of an ambiguous base class.

llvm-svn: 197125
2013-12-12 03:40:18 +00:00
Alp Toker 4b739894f0 Swap around EXPECT_EQ() arguments orders for more natural gtest Failure messages
Somewhat counterintuitively the first arg in gtest is treated as the
expectation.

No change to the tests themselves.

llvm-svn: 197124
2013-12-12 03:31:20 +00:00
Rui Ueyama d3199fdd2e [PECOFF] Parse /dll command line option.
llvm-svn: 197123
2013-12-12 03:21:45 +00:00
Rui Ueyama 4cf5a16117 [PECOFF] Add /dllexport option.
/DLLEXPORT is a command line option to export a symbol. __declspec(dllexport)
uses that to make the linker to export DLLExport'ed functions, by adding the
option to .drectve section.

This patch implements the parser of the command line option.

llvm-svn: 197122
2013-12-12 03:11:26 +00:00
Alp Toker d0d1a74ac9 Add missing escape characters to the new Regex::escape() function
The old AddFixedStringToRegEx() it was based on got away with this for the
longest time, but the problem became easy to spot after the cleanup in r197096.

Also add a quick unit test to cover regex escaping.

llvm-svn: 197121
2013-12-12 02:51:58 +00:00
Richard Smith 48d1b65541 Update user manual to note that implementation for C++11 and C++1y is complete, and fix a bunch of other issues here.
llvm-svn: 197120
2013-12-12 02:42:17 +00:00
Reed Kotler 3230e725aa Check for null pointer before dereferencing. A careless typo on my part.
I don't know why this did not show up earlier. This code has been
around for ages. 

llvm-svn: 197119
2013-12-12 02:41:11 +00:00
Hans Wennborg bf6dda5116 Re-apply r197076 and r197086; the build was fixed by chapuni in r197114.
llvm-svn: 197116
2013-12-12 02:24:20 +00:00
NAKAMURA Takumi 10cc1bdb70 Fix autoconf build in libclang since r197075, (has been reverted in r197111).
llvm-svn: 197114
2013-12-12 02:19:37 +00:00
Kevin Qin e4ddaa1bd5 Fix Incorrect CHECK message [0-31]+ in test case.
In regular expression, [0-31]+ equals to [0-3]+, not the number from
0 to 31. So change it to [0-9]+.

llvm-svn: 197113
2013-12-12 02:19:13 +00:00
Kevin Qin daaae418d8 Fix Incorrect CHECK message [0-31]+ in test case.
In regular expression, [0-31]+ equals to [0-3]+, not the number from
0 to 31. So change it to [0-9]+.

llvm-svn: 197112
2013-12-12 02:17:35 +00:00
Hans Wennborg 69a458f690 Revert r197076: "[objcmt] When emitting a remap file, use a json format
with the edit entries, instead of applying the changes"

(And also revert the follow-up r197086.)

This seems to have broken Linux builds, which were failing with the following:

/build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so:
error: undefined reference to
'clang::ento::objc_retain::CallEffects::getEffect(clang::ObjCMethodDecl const*)'
/build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so:
error: undefined reference to
'clang::ento::objc_retain::CallEffects::getEffect(clang::FunctionDecl const*)'
collect2: error: ld returned 1 exit status

llvm-svn: 197111
2013-12-12 02:12:17 +00:00
Aaron Ballman 0fa079f332 Switching to using hasGlobalStorage instead of !hasLocalStorage for better clarity.
llvm-svn: 197110
2013-12-12 02:03:50 +00:00
Yi Jiang f92a574246 Resubmit r196544: Apply transformation on OS X 10.9+ and iOS 7.0+: pow(10, x) ―> __exp10(x)
llvm-svn: 197109
2013-12-12 01:55:04 +00:00
Greg Clayton 4705f8d842 LLDB can crash if given DWARF debug info for a class that has a base class which isn't a complete definition.
<rdar://problem/15594781>

We need to not crash at any cost. We currently detect if any base classes are forward declarations, emit an error string that directs the use to file a compiler bug, and continues by completing the class with no contents. This avoids a clang crash that would usually follow when we call setBase().

llvm-svn: 197108
2013-12-12 01:54:04 +00:00
Enrico Granata 601ec50ac9 Actually initialize the magic pointer to NULL safely
llvm-svn: 197107
2013-12-12 01:47:35 +00:00
Enrico Granata 739050236e Having binary files in a repository is not a good thing
With this checkin, we use the installed clang compiler to build crashinfo.so from crashinfo.c upon every test suite execution
We also try to cleanup after ourselves, which of course will only work if the test suite does not actually crash

llvm-svn: 197106
2013-12-12 01:42:17 +00:00
Yi Jiang 53823be49d Add TargetLibraryInfo in LTO passes builder
llvm-svn: 197105
2013-12-12 01:37:39 +00:00
Aaron Ballman 75a1729c4b Added a Subjects clause to the section attribute and made its diagnostics more consistent with other attributes.
llvm-svn: 197104
2013-12-12 01:34:39 +00:00
Richard Smith c934e4fd2c PR18217: Rewrite JumpDiagnostics' handling of temporaries, to correctly handle
declarations that might lifetime-extend multiple temporaries. In passing, fix a
crasher (PR18217) if an initializer was dependent and exactly the wrong shape,
and remove a bogus function (Expr::findMaterializedTemporary) now its last use
is gone.

llvm-svn: 197103
2013-12-12 01:27:02 +00:00
Fariborz Jahanian 49e69ee557 Objective-C migrator: when inferring 'readonly' property of an
Objective-C object conforming to 'NSCopying' protocol, infer
a 'copy' property, instead of 'strong'. // rdar://15525937

llvm-svn: 197102
2013-12-12 01:02:00 +00:00
Hans Wennborg e6a8775183 Use llvm::Regex::Escape in VerifyDiagnosticConsumer.cpp
This depends on LLVM r197096.

llvm-svn: 197101
2013-12-12 00:27:31 +00:00
Hal Finkel fa50630e43 Remove unused multiclass from PPCInstrInfo.td
llvm-svn: 197100
2013-12-12 00:23:29 +00:00
Hal Finkel ceb1f12d9a Improve instruction scheduling for the PPC POWER7
Aside from a few minor latency corrections, the major change here is a new
hazard recognizer which focuses on better dispatch-group formation on the
POWER7. As with the PPC970's hazard recognizer, the most important thing it
does is avoid load-after-store hazards within the same dispatch group. It uses
the POWER7's special dispatch-group-terminating nop instruction (instead of
inserting multiple regular nop instructions). This new hazard recognizer makes
use of the scheduling dependency graph itself, built using AA information, to
robustly detect the possibility of load-after-store hazards.

significant test-suite performance changes (the error bars are 99.5% confidence
intervals based on 5 test-suite runs both with and without the change --
speedups are negative):

speedups:

MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2
	-0.55171% +/- 0.333168%

MultiSource/Benchmarks/TSVC/CrossingThresholds-dbl/CrossingThresholds-dbl
	-17.5576% +/- 14.598%

MultiSource/Benchmarks/TSVC/Reductions-dbl/Reductions-dbl
	-29.5708% +/- 7.09058%

MultiSource/Benchmarks/TSVC/Reductions-flt/Reductions-flt
	-34.9471% +/- 11.4391%

SingleSource/Benchmarks/BenchmarkGame/puzzle
	-25.1347% +/- 11.0104%

SingleSource/Benchmarks/Misc/flops-8
	-17.7297% +/- 9.79061%

SingleSource/Benchmarks/Shootout-C++/ary3
	-35.5018% +/- 23.9458%

SingleSource/Regression/C/uint64_to_float
	-56.3165% +/- 25.4234%

SingleSource/UnitTests/Vectorizer/gcc-loops
	-18.5309% +/- 6.8496%

regressions:

MultiSource/Benchmarks/ASCI_Purple/SMG2000/smg2000
	18.351% +/- 12.156%

SingleSource/Benchmarks/Shootout-C++/methcall
	27.3086% +/- 14.4733%

llvm-svn: 197099
2013-12-12 00:19:11 +00:00
Hal Finkel 03071ab74c Add isBarrier to SDep
SDep had is* functions for the other kinds of order dependencies (isMustAlias,
isWeak, isArtificial, etc.), but not for barrier. Upcoming commits in the
PowerPC backend will make use of this function.

llvm-svn: 197098
2013-12-12 00:19:07 +00:00
Quentin Colombet 18b779e3f4 Fix an over-constrained assertion in MachineFunction::addLiveIn.
The assertion was checking that the virtual register VReg used to represent the
physical register PReg uses the same register class as the one passed to
MachineFunction::addLiveIn.
This is over-constraining because it is sufficient to check that the register
class of VReg (VRegRC) is a subclass of the register class of PReg (PRegRC) and
that VRegRC contains PReg.
Indeed, if VReg gets constrained because of some operation constraints
between two calls of MachineFunction::addLiveIn, the original assertion
cannot match.

This fixes <rdar://problem/15633429>. 

llvm-svn: 197097
2013-12-12 00:15:47 +00:00
Hans Wennborg 6f4f77b7e9 Expose FileCheck's AddFixedStringToRegEx as Regex::escape
Both FileCheck and clang's -verify need to escape strings for regexes,
so let's expose this as a utility in the Regex class.

llvm-svn: 197096
2013-12-12 00:06:41 +00:00
Enrico Granata 2c3f140551 <rdar://problem/15640353>
Add an hook for the test suite into the OSX-only CrashReporter "App-specific info"

This allows the test suite to set the crash info to the name and file location of every test as the test gets executed
If the test suite crashes, the crash log will then report which test is the culprit, even when not using verbose mode

This only works on OSX, and defaults to not doing anything on other platforms, but OS/platform-specific invocations
can be devised by each individual platform

llvm-svn: 197095
2013-12-12 00:02:05 +00:00
Ted Kremenek 5d0fb1ea1c Add CFG tests for switch's involving "extended" enum.
llvm-svn: 197094
2013-12-11 23:44:05 +00:00
Ted Kremenek 8844660641 Add new PrintingPolicy entry to trim number of newlines. Useful for the CFG printer.
The change isn't completely comprehensive.  This can be filled in
lazily as needed.  There is one consumer right now.

llvm-svn: 197093
2013-12-11 23:44:02 +00:00
Hans Wennborg cda4b6dd00 Change semantics of regex expectations in the diagnostic verifier
Previously, a line like

  // expected-error-re {{foo}}

treats the entirety of foo as a regex. This is inconvenient when matching type
names containing regex characters. For example, to match
"void *(class test8::A::*)(void)" inside such a regex, one would have to type
"void \*\(class test8::A::\*\)\(void\)".

This patch changes the semantics of expected-error-re to only treat the parts
of the directive wrapped in double curly braces as regexes. This avoids the
escaping problem and leads to nicer patterns for those cases; see e.g. the
change to test/Sema/format-strings-scanf.c.

(The balanced search for closing }} of a directive also makes us handle the
full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.)

Differential Revision: http://llvm-reviews.chandlerc.com/D2388

llvm-svn: 197092
2013-12-11 23:40:50 +00:00
Chad Rosier 6030c84a2f [AArch64] Refactor NEON floating-point Max/Min/Maxnm/Minnm across vector AArch64
intrinsics to use f32 types, rather than their vector equivalents.

llvm-svn: 197091
2013-12-11 23:21:39 +00:00
Chad Rosier 446d8ea0fb [AArch64] Refactor NEON floating-point Max/Min/Maxnm/Minnm across vector AArch64
intrinsics to use f32 types, rather than their vector equivalents.

llvm-svn: 197090
2013-12-11 23:21:25 +00:00
Hal Finkel 94a6f380bb Fix the PPC subsumes-predicate check
For one predicate to subsume another, they must both check the same condition
register. Failure to check this prerequisite was causing miscompiles.

Fixes PR18003.

llvm-svn: 197089
2013-12-11 23:12:25 +00:00
Greg Clayton 78f4d95d09 Fixed parsing the DW_TAG_member children for structs, unions and classes to not alway treat every member as a bitfield.
The previous fix for bitfields made us always search for anonymous bitfields regardless of the member (bitfield or normal field).

llvm-svn: 197088
2013-12-11 23:10:39 +00:00
Greg Clayton 7cff313335 Make this test an expected fail on darwin until we can fix this bug.
llvm-svn: 197087
2013-12-11 23:08:25 +00:00
Alp Toker 7afe9908d2 Remove extra qualification to fix build with g++ after r197076
llvm-svn: 197086
2013-12-11 22:50:04 +00:00
Rui Ueyama 9e7b3cb024 Add .clang-format file to ensure C++11 LLVM coding style.
llvm-svn: 197085
2013-12-11 22:39:33 +00:00
Hal Finkel 4fd3b1de2a Add two additional hazard recognizer functions
This adds two additional functions to the hazard recognizer interface. These
are optional (in the sense that the default implementations preserve the
current behavior), and used by the post-RA scheduler. Upcoming commits will use
this functionality in order to improve dispatch-group formation on the POWER7
and related cores. Dispatch groups are an odd construct: sometimes we need to
insert nops to force a new one to start (for performance reasons), and some
instructions need to appear in certain positions within a group, but the groups
are not fundamentally cycle based (they can contain instructions with data
dependencies with non-trivial latencies).

Motivation:

unsigned PreEmitNoops(SUnit *) - Used to force the post-RA scheduler to insert
nops to force a new dispatch group to begin. We already have a NoopHazard, and
this is also still needed. However, NoopHazard only causes a nop to be inserted
if there are no other available instructions, and so is not always sufficient.
The number of nops to insert depends on state that only the hazard recognizer
has, so a general callback is necessary.

bool ShouldPreferAnother(SUnit *) - Used to avoid scheduling instructions that
would start a new dispatch group when others are available that could be part
of the current dispatch group. In this case, we don't want to issue nops,
because the non-preferred instruction will implicitly start a new dispatch
group regardless.

Although the motivation for these functions is driven by the PowerPC backend,
they are completely general.

llvm-svn: 197084
2013-12-11 22:33:43 +00:00