Commit Graph

207964 Commits

Author SHA1 Message Date
Alex Lorenz 50b826fb75 MIR Serialization: Serialize the global value call entry pseudo source values.
llvm-svn: 245097
2015-08-14 21:08:30 +00:00
Anna Zaks e5d74caf2a [analyzer] Add checkers for OS X / iOS localizability issues
Add checkers that detect code-level localizability issues for OS X / iOS:
  - A path sensitive checker that warns about uses of non-localized
    NSStrings passed to UI methods expecting localized strings.
  - A syntax checker that warns against not including a comment in
    NSLocalizedString macros.

A patch by Kulpreet Chilana!

(This is the second attempt with the compilation issue on Windows and
the random test failures resolved.)

llvm-svn: 245093
2015-08-14 20:22:22 +00:00
Michael Kruse 78a2e4720d [RegionInfo] Remove unused and broken function splitBlock
Summary:
It always makes NewBB the entry of the region instead of OldBB. This breaks if there are edges from inside the region to OldBB. OldBB is moved out of the region and hence there are exiting edges to OldBB and the region's exit block, contradicting the single-exit condition for regions.

The only use from Polly is going to be removed, hence I propose to remove the function completely.

Reviewers: grosser

Subscribers: llvm-commits

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

llvm-svn: 245092
2015-08-14 20:20:00 +00:00
Michael Kruse 82a1c7de09 Make TempScopInfo a RegionPass
This modifies the order in which Polly passes are executed.

Assuming a function has two scops (A and B), the order before was:

FunctionPassManager
  ScopDetection
  IndependentBlocks
  TempScopInfo for A and B
  RegionPassManager
    ScopInfo for A
    DependenceInfo for A
    IslScheduleOptimizer for A
    IslAstInfo for A
    CodeGeneration for A
    ScopInfo for B
    DependenceInfo for B
    IslScheduleOptimizer for B
    IslAstInfo for B
    CodeGeneration for B

After this patch:

FunctionPassManager
  ScopDetection
  IndependentBlocks
  RegionPassManager
    TempScopInfo for A
    ScopInfo for A
    DependenceInfo for A
    IslScheduleOptimizer for A
    IslAstInfo for A
    CodeGeneration for A
    TempScopInfo for B
    ScopInfo for B
    DependenceInfo for B
    IslScheduleOptimizer for B
    IslAstInfo for B
    CodeGeneration for B

TempScopInfo for B might store information and references to the IR
that CodeGeneration for A might modify. Changing the order ensures that
the IR is not modified from the analysis of a region until code
generation.

Reviewers: grosser

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

llvm-svn: 245091
2015-08-14 20:10:27 +00:00
Greg Clayton 8b4edba9da Move all clang type system DWARF type parsing into ClangASTContext.cpp.
Another step towards isolating all language/AST specific code into the files to further abstract specific implementations of parsing types for a given language.

llvm-svn: 245090
2015-08-14 20:02:05 +00:00
Reid Kleckner 4ca630be18 Fixup stale comment about supported OSs
llvm-svn: 245089
2015-08-14 20:01:27 +00:00
Tom Stellard bef1094ee7 AMDGPU/SI: Add missing spill class
The compiler was failing to spill for some shaders.

Patch By: Axel Davy

llvm-svn: 245087
2015-08-14 19:46:05 +00:00
Renato Golin 980b6cc42b Revert "[ARM] Fix MachO CPU Subtype selection"
This reverts commit r245081, as it breaks many builds.

llvm-svn: 245086
2015-08-14 19:35:47 +00:00
Alex Lorenz 1039fd1ae5 MIR Serialization: Serialize the 'internal' register operand flag.
llvm-svn: 245085
2015-08-14 19:07:07 +00:00
Martell Malone b8a3fe7a53 WindowsX86: long double is x87DoubleExtended on mingw
Summary:
    long double on x86 mingw is 80bits and is aligned to 16bytes

	Fixes:
    https://llvm.org/bugs/show_bug.cgi?id=24398

    Reviewers: rnk

    Subscribers: cfe-commits

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

llvm-svn: 245084
2015-08-14 19:05:56 +00:00
Reid Kleckner 397a17bfeb Don't run explicit-modules-missing-files.cpp on Windows
It is flaky due to inability to remove files with open handles.  We
could paper over it with rm -f, but then the file would still be
present.

This is more evidence to me that we should roll our own 'rm'
implementation in LLVM.

llvm-svn: 245083
2015-08-14 19:03:02 +00:00
Alex Lorenz f9a2b12361 MIR Serialization: Serialize the bundled machine instructions.
llvm-svn: 245082
2015-08-14 18:57:24 +00:00
Vedant Kumar 2f079be789 [ARM] Fix MachO CPU Subtype selection
This patch makes the Darwin ARM backend take advantage of TargetParser.  It
also teaches TargetParser about ARMV7K for the first time. This makes target
triple parsing more consistent across llvm.

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

llvm-svn: 245081
2015-08-14 18:36:47 +00:00
Reid Kleckner 14b7dde85f Move ASAN_OPTIONS setting from compile command to run command, fixes test on posix
llvm-svn: 245079
2015-08-14 18:29:00 +00:00
Greg Clayton ecc7443384 Don't test the output of "target modules dump symfile a.out" as this isn't something we should be testing for. This makes this test pass again.
llvm-svn: 245078
2015-08-14 18:18:07 +00:00
Martell Malone 7ccda3c38b Windows ARM: ignore calling conventions as described on MSDN
Summary:
MSDN says that fastcall, stdcall, thiscall, and vectorcall are all
accepted but ignored on ARM and X64.
https://msdn.microsoft.com/en-us/library/984x0h58.aspx

MSDN also says cdecl is also accepted and typically ignored
This patch brings ARM in line with how we ignore them for X64

Reviewers: rnk

Subscribers: compnerd, cfe-commits

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

llvm-svn: 245076
2015-08-14 18:00:09 +00:00
Sanjay Patel ed502905f7 [x86] fix allowsMisalignedMemoryAccess() implementation
This patch fixes the x86 implementation of allowsMisalignedMemoryAccess() to correctly
return the 'Fast' output parameter for 32-byte accesses. To test that, an existing load
merging optimization is changed to use the TLI hook. This exposes a shortcoming in the
current logic and results in the regression test update. Changing other direct users of
the isUnalignedMem32Slow() x86 CPU attribute would be a follow-on patch.

Without the fix in allowsMisalignedMemoryAccesses(), we will infinite loop when targeting
SandyBridge because LowerINSERT_SUBVECTOR() creates 32-byte loads from two 16-byte loads
while PerformLOADCombine() splits them back into 16-byte loads.

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

llvm-svn: 245075
2015-08-14 17:53:40 +00:00
Vedant Kumar 06f0678010 [test] Testing write access to llvm
llvm-svn: 245074
2015-08-14 17:42:50 +00:00
Reid Kleckner 89d994367a [windows] Fix or XFAIL remaining portable test failures and enable them
Summary:
This involved various fixes:

- Move a test that uses ulimit to Posix.

- Add a few "REQUIRES: shell" lines to tests using backtick subshell
  evaluation.

- The MSVC CRT buffers stdio if the output is a pipe by default. Some
  tests need that disabled to avoid interleaving test stdio with asan
  output.

- MSVC headers provide _alloca instead of alloca (go figure), so add a
  portability macro to the two alloca tests.

- XFAIL tests that rely on accurate symbols, we need to pass more flags
  to make that work.

- MSVC's printf implementation of %p uses upper case letters and doesn't
  add 0x, so do that manually.

- Accept "SEGV" or "access-violation" reports in crash tests.

Reviewers: samsonov

Subscribers: tberghammer, danalbert, llvm-commits, srhines

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

llvm-svn: 245073
2015-08-14 17:39:48 +00:00
Justin Bogner 7ae63aa85d [sancov] Fix an unused variable warning introduced in r245067
llvm-svn: 245072
2015-08-14 17:03:45 +00:00
Kit Barton ae78d53aeb Reverting patch r244235.
This patch will be redone in a different way. See
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150810/292978.html
for more details.

llvm-svn: 245071
2015-08-14 16:54:32 +00:00
Reid Kleckner d7a568fc4f [cmake] Start adding support for LLVM_USE_SANITIZER=Address on Windows
Pass "-fsanitize=address" to the compiler and "-debug" to the linker.

llvm-svn: 245070
2015-08-14 16:48:34 +00:00
Rafael Espindola 1bd885aba4 ELF: Also record the type of undefined symbols.
Tested with a weak undefined. Testing with a plain undefined will have to wait
for support for -shared.

llvm-svn: 245069
2015-08-14 16:46:28 +00:00
Reid Kleckner a57d015154 [sancov] Leave llvm.localescape in the entry block
Summary: Similar to the change we applied to ASan. The same test case works.

Reviewers: samsonov

Subscribers: llvm-commits

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

llvm-svn: 245067
2015-08-14 16:45:42 +00:00
Zachary Turner 4cceca7c15 Update dosep to print unexpected successes at the end.
llvm-svn: 245066
2015-08-14 16:45:32 +00:00
Chad Rosier 67dca908fe Cleanup test whitespace or lack thereof. NFC.
llvm-svn: 245065
2015-08-14 16:34:15 +00:00
Chris Bieneman 9df5d7c272 [CMake] Fix PR14200, llvm-config output misses -fno-rtti
This change adds RTTI and Exception flags to llvm-config's cxxflags. This solution is a minimal patch to solve the issue, and is recommended for the 3.7 release branch. Tom Stellard's outstanding work is the longer term solution.

Patch By: David Wiberg

llvm-svn: 245064
2015-08-14 16:20:31 +00:00
Douglas Katzman cb07d15b4c Represent 2 parallel string arrays as one string[][2] array.
Differential Revision: http://reviews.llvm.org/D11991

llvm-svn: 245063
2015-08-14 15:52:12 +00:00
Rafael Espindola dbaf0498a9 Revert "Centralize the information about which object format we are using."
This reverts commit r245047.

It was failing on the darwin bots. The problem was that when running

./bin/llc -march=msp430

llc gets to

  if (TheTriple.getTriple().empty())
    TheTriple.setTriple(sys::getDefaultTargetTriple());

Which means that we go with an arch of msp430 but a triple of
x86_64-apple-darwin14.4.0 which fails badly.

That code has to be updated to select a triple based on the value of
march, but that is not a trivial fix.

llvm-svn: 245062
2015-08-14 15:48:41 +00:00
Rafael Espindola bd481b8f89 Fix the build with gcc.
llvm-svn: 245060
2015-08-14 15:20:34 +00:00
Davide Italiano c0ea1e6d63 Convert tests under MC/ELF from macho-dump to llvm-readobj.
Yet another step towards deprecating macho-dump.

llvm-svn: 245059
2015-08-14 15:16:37 +00:00
Sanjay Patel 2e75341b7f don't repeaat function names in comments; NFC
llvm-svn: 245058
2015-08-14 15:11:42 +00:00
Rafael Espindola c44d17ad45 Add the type of the symbols to the symbol table.
For now only defined symbols are covered. I will add undefined ones in the
next patch.

llvm-svn: 245057
2015-08-14 15:10:49 +00:00
Rafael Espindola 457c940835 Delete dead code.
llvm-svn: 245056
2015-08-14 14:58:57 +00:00
Rafael Espindola 4c3aa0f228 Delete unused forward declarations.
llvm-svn: 245055
2015-08-14 14:51:11 +00:00
David Majnemer e694f3e847 [ASTContext] Call APValue destructors for MaterializedTemporaryValues
Hopefully this makes the sanitizer build bot happy.

llvm-svn: 245054
2015-08-14 14:43:50 +00:00
Rafael Espindola 3bf356ee9c Remove unused default values.
llvm-svn: 245053
2015-08-14 14:38:44 +00:00
Alexander Kornienko 5f252cac51 [clang-tidy] Move IncludeSorter.* and IncludeInserter.* to clang-tidy/utils/
This is better structurally and it also fixes a linker error in the configure
build.

llvm-svn: 245052
2015-08-14 14:31:31 +00:00
Davide Italiano da8a3b903b [Sema] main can't be declared as global variable, in C++.
So, we now reject that. We also warn for any external-linkage global
variable named main in C, because it results in undefined behavior.

PR:	  24309
Differential Revision:	http://reviews.llvm.org/D11658
Reviewed by:	rsmith

llvm-svn: 245051
2015-08-14 14:13:29 +00:00
Rafael Espindola beee25e484 Make these headers as being c++.
llvm-svn: 245050
2015-08-14 14:12:54 +00:00
Rafael Espindola 383c323d4d ELF: Set the correct symbol binding.
llvm-svn: 245049
2015-08-14 13:52:36 +00:00
Daniel Jasper ea223a7a6a misc-unused-parameters: Fix crasher with C forward declarations that
can leave out the parameter list.

llvm-svn: 245048
2015-08-14 13:39:57 +00:00
Rafael Espindola 90eb70c8a7 Centralize the information about which object format we are using.
Other than some places that were handling unknown as ELF, this should
have no change. The test updates are because we were detecting
arm-coff or x86_64-win64-coff as ELF targets before.

It is not clear if the enum should live on the Triple. At least now it lives
in a single location and should be easier to move somewhere else.

llvm-svn: 245047
2015-08-14 13:31:17 +00:00
Alexander Kornienko 078ab134ea [clang-tidy] Don't use delegating constructors.
llvm-svn: 245046
2015-08-14 13:23:55 +00:00
Alexander Kornienko fc650864ef [clang-tidy] Create clang-tidy module modernize. Add pass-by-value check.
This is the first step for migrating cppmodernize to clang-tidy.

http://reviews.llvm.org/D11946

Patch by Angel Garcia!

llvm-svn: 245045
2015-08-14 13:17:11 +00:00
Rafael Espindola 62b81b875a Start populating the symbol table.
With this patch only the name is set. I will set the other fields shortly.

For now the table doesn't include local symbols. This is equivalent to using
--discard-all with gnu ld. This is OK for now since the symbols are not
needed for execution and for testing symbol resolution we only need the
global symbols.

llvm-svn: 245044
2015-08-14 13:07:05 +00:00
Daniel Jasper d788457da5 clang-format: Don't remove space between #elif and parentheses.
Before:
  #elif(AAAA && BBBB)

After:
  #elif (AAAA && BBBB)

llvm-svn: 245043
2015-08-14 12:44:06 +00:00
Alexander Kornienko 8cc024ee37 [clang-tidy] Fix IncludeInserter/IncludeSorter bug.
If there weren't any includes in the file, or all of them had 'IncludeKind'
greater than the desired one, then 'CreateIncludeInsertion' didn't work.

http://reviews.llvm.org/D12017

Patch by Angel Garcia!

llvm-svn: 245042
2015-08-14 12:33:25 +00:00
Alexey Bataev b08f89ffc1 [OPENMP] Fix for http://llvm.org/PR24371: Assert failure compiling blender 2.75.
blender uses statements expression in condition of the loop under control of the '#pragma omp parallel for'. This condition is used several times in different expressions required for codegen of the loop directive. If there are some variables defined in statement expression, it fires an assert during codegen because of redefinition of the same variables.
We have to rebuild several expression to be sure that all variables are unique.

llvm-svn: 245041
2015-08-14 12:25:37 +00:00
Manuel Klimek 5d093286f0 Fix AST matcher documentation.
Fix a bug in the matcher docs where callExpr(on(...)) was in the examples,
but didn't work (on() only works for memberCallExpr).

Fix a bug in the doc dump script that was introduced in r231575 when
removing a regexp capture without adapting the code that uses the
captures.

llvm-svn: 245040
2015-08-14 11:47:51 +00:00