Hans Wennborg [Sun, 26 Oct 2014 20:00:53 +0000 (20:00 +0000)]
ModuleMap.cpp: fix Windows build, take 2
llvm-svn: 220646
Hans Wennborg [Sun, 26 Oct 2014 19:50:13 +0000 (19:50 +0000)]
Revert "[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change." (r220642)
It broke the Windows build:
[1/19] Building CXX object lib\CodeGen\CMakeFiles\LLVMCodeGen.dir\RegAllocPBQP.cpp.obj
C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\llvm\include\llvm/CodeGen/RegAllocPBQP.h(132) : error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>'
with
[
_Ty=unsigned int []
]
D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1600) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr'
with
[
_Ty=unsigned int []
]
This diagnostic occurred in the compiler generated function 'llvm::PBQP::RegAlloc::NodeMetadata::NodeMetadata(const llvm::PBQP::RegAlloc::NodeMetadata &)'
llvm-svn: 220645
Hans Wennborg [Sun, 26 Oct 2014 19:39:46 +0000 (19:39 +0000)]
ModuleMap.cpp: fix VS2012 build
llvm-svn: 220644
Hans Wennborg [Sun, 26 Oct 2014 19:27:02 +0000 (19:27 +0000)]
Try to fix the Windows build after r220637
llvm-svn: 220643
Lang Hames [Sun, 26 Oct 2014 18:50:52 +0000 (18:50 +0000)]
[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change.
llvm-svn: 220642
Lang Hames [Sun, 26 Oct 2014 18:16:27 +0000 (18:16 +0000)]
[PBQP] Tidy up CostAllocator.h: fix variable case, rename CostPool to ValuePool.
No functional change. This just brings things more in-line with coding
standards, and makes ValuePool's functionality clearer (it's not tied to pooling
costs, and we may want to use it to hold other things in the future).
llvm-svn: 220641
Daniel Jasper [Sun, 26 Oct 2014 14:26:55 +0000 (14:26 +0000)]
Delete unused method and clangAST dependency it required.
llvm-svn: 220640
NAKAMURA Takumi [Sun, 26 Oct 2014 13:12:35 +0000 (13:12 +0000)]
ModuleMap::addHeader(): Appease msc17.
llvm-svn: 220639
Elena Demikhovsky [Sun, 26 Oct 2014 09:52:24 +0000 (09:52 +0000)]
AVX-512: Fixed encoding of VPBROADCASTM and added SKX forms of this instruction
llvm-svn: 220638
Alexey Samsonov [Sun, 26 Oct 2014 06:23:07 +0000 (06:23 +0000)]
Change StackDepot interface to use StackTrace more extensively
llvm-svn: 220637
Alexey Samsonov [Sun, 26 Oct 2014 05:43:17 +0000 (05:43 +0000)]
Fixup deadlock sanitizer after r220635
llvm-svn: 220636
Alexey Samsonov [Sun, 26 Oct 2014 03:35:14 +0000 (03:35 +0000)]
[Sanitizer] Make StackTrace a lightweight reference to array of PCs, and
introduce a BufferedStackTrace class, which owns this array.
Summary:
This change splits __sanitizer::StackTrace class into a lightweight
__sanitizer::StackTrace, which doesn't own array of PCs, and BufferedStackTrace,
which owns it. This would allow us to simplify the interface of StackDepot,
and eventually merge __sanitizer::StackTrace with __tsan::StackTrace.
Test Plan: regression test suite.
Reviewers: kcc, dvyukov
Reviewed By: dvyukov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5985
llvm-svn: 220635
Alexander Kornienko [Sun, 26 Oct 2014 02:58:07 +0000 (02:58 +0000)]
[clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh
Summary: Make the script suitable for checking just messages. Move most of the tests to use it. Clean up the tests: shorten messages, insert line numbers, remove unnecessary RUN: lines, etc.
Reviewers: klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5989
llvm-svn: 220634
Alexander Kornienko [Sun, 26 Oct 2014 02:21:32 +0000 (02:21 +0000)]
[clang-tidy] Clean up test.
Simplify RUN lines and make checks stricter, check messages instead of fixes.
llvm-svn: 220633
Alexander Kornienko [Sun, 26 Oct 2014 02:18:06 +0000 (02:18 +0000)]
[clang-tidy] Simplify RUN: lines in the test
llvm-svn: 220632
Alexander Kornienko [Sun, 26 Oct 2014 01:41:14 +0000 (01:41 +0000)]
[clang-tidy] Bring order to check registration.
Summary:
Register readability checks in a separate module. Renamed the checks
and test file names accordingly.
Reviewers: djasper, klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5936
llvm-svn: 220631
Saleem Abdulrasool [Sat, 25 Oct 2014 23:33:21 +0000 (23:33 +0000)]
Driver: reduce search logic duplication
Refactor the path search into a helper function to avoid duplicating the path
handling for the search. NFC.
llvm-svn: 220628
Saleem Abdulrasool [Sat, 25 Oct 2014 20:54:51 +0000 (20:54 +0000)]
builtins: avoid endian.h in favour of compiler builtins
Use the __BYTE_ORDER__ macro which has been available in GCC since 4.6 and is
available in clang as well.
llvm-svn: 220626
Saleem Abdulrasool [Sat, 25 Oct 2014 20:49:12 +0000 (20:49 +0000)]
test: attempt to make test more hermetic
Add a fake linker in to a sysroot to use for testing the driver's tool
invocation. Should make the test behave similarly on all platforms. Addresses
review comments from Reid Kleckner from SVN r220546.
llvm-svn: 220625
Saleem Abdulrasool [Sat, 25 Oct 2014 20:48:35 +0000 (20:48 +0000)]
Driver: assume that all architectures are supported for libstc++
Rather than asserting that the target is unsupported, make a guess at what the
tree for a port would look like and use that for the search path.
Addresses review comments from Ried Kleckner for SVN r220547.
llvm-svn: 220624
Andrew Trick [Sat, 25 Oct 2014 19:59:30 +0000 (19:59 +0000)]
LSR: Minor cleanup after Daniel's patch.
Combine the Inserted an Done sets into a Visited set.
llvm-svn: 220623
Andrew Trick [Sat, 25 Oct 2014 19:42:07 +0000 (19:42 +0000)]
Fix LSR compile time.
This is a simple fix that brings the compilation time from 5min to 5s
on a specific real-world example. It's a large chain of computation in
a crypto routine (always a problem for SCEV). A unit test is not
feasible and there would be no way to check it. The fix is just basic
good practice for dealing with SCEVs, there's no risk of regression.
Patch by Daniel Reynaud!
llvm-svn: 220622
Peter Zotov [Sat, 25 Oct 2014 19:01:14 +0000 (19:01 +0000)]
[OCaml] hexagon can't run MCJIT tests, XFAIL it.
llvm-svn: 220621
Peter Zotov [Sat, 25 Oct 2014 18:50:02 +0000 (18:50 +0000)]
[OCaml] Unbreak Llvm_executionengine.initialize_native_target.
First, return true on success, as it is the OCaml convention.
Second, also initialize the native assembly printer, which is,
despite the name, required for MCJIT operation.
Since this function did not initialize the assembly printer earlier
and no function to initialize native assembly printer was available
elsewhere, it is safe to break its interface: it means that it
simply could not be used successfully before.
llvm-svn: 220620
Peter Zotov [Sat, 25 Oct 2014 18:49:56 +0000 (18:49 +0000)]
[OCaml] Expose Llvm_executionengine.ExecutionEngine.create_mcjit.
llvm-svn: 220619
Jingyue Wu [Sat, 25 Oct 2014 18:34:03 +0000 (18:34 +0000)]
[SeparateConstOffsetFromGEP] Fixed a bug related to unsigned modulo
The dividend in "signed % unsigned" is treated as unsigned instead of signed,
causing unexpected behavior such as -64 % (uint64_t)24 == 0.
Added a regression test in split-gep.ll
Patched by Hao Liu.
llvm-svn: 220618
Benjamin Kramer [Sat, 25 Oct 2014 18:20:17 +0000 (18:20 +0000)]
Unbreak the build.
llvm-svn: 220617
Benjamin Kramer [Sat, 25 Oct 2014 18:09:01 +0000 (18:09 +0000)]
Clean up assume intrinsic pattern matching, no need to check that the argument is a value.
Also make it const safe and remove superfluous casting. NFC.
llvm-svn: 220616
Jingyue Wu [Sat, 25 Oct 2014 17:36:21 +0000 (17:36 +0000)]
[SeparateConstOffsetFromGEP] Fixed a bug in rebuilding OR expressions
The two operands of the new OR expression should be NextInChain and TheOther
instead of the two original operands.
Added a regression test in split-gep.ll.
Hao Liu reported this bug, and provded the test case and an initial patch.
Thanks!
llvm-svn: 220615
David Majnemer [Sat, 25 Oct 2014 11:40:40 +0000 (11:40 +0000)]
Lex: Fix an invalid access into a SmallString
We would crash because we used operator[] to access past the end of a
SmallString. This occured because our token had length zero.
Instead, form the pointer using .data() and arithmetic. This is safe
because this forms a one-past-the-end pointer and it is only used to
compare with another one-past-the-end pointer.
This fixes PR21379.
llvm-svn: 220614
Simon Pilgrim [Sat, 25 Oct 2014 08:11:20 +0000 (08:11 +0000)]
[X86][SSE] Vector integer/float conversion memory folding
Tidied up some entries in the folding tables so that they are under the correct comment section (they were categorised as AVX2 instructions when they're AVX1).
Minor patch agreed with qcolombet.
llvm-svn: 220613
David Majnemer [Sat, 25 Oct 2014 07:13:13 +0000 (07:13 +0000)]
InstCombine: Remove overzealous asserts
These asserts can trigger if the worklist iteration order is
sufficiently unlucky. Instead of adding special case logic to handle
these edge conditions, just bail out on trying to transform them:
InstSimplify will get them when it reaches them on the worklist.
This fixes PR21378.
N.B. No test case is included because any test would rely on the
fragile worklist iteration order.
llvm-svn: 220612
Rafael Espindola [Sat, 25 Oct 2014 04:31:08 +0000 (04:31 +0000)]
Allow the C API users to keep relying on the OutMessages parameter.
Should fix the Ocaml tests.
llvm-svn: 220611
Rafael Espindola [Sat, 25 Oct 2014 04:07:53 +0000 (04:07 +0000)]
Remove unused variable.
llvm-svn: 220610
Rafael Espindola [Sat, 25 Oct 2014 04:06:14 +0000 (04:06 +0000)]
Update for LLVM api change.
llvm-svn: 220609
Rafael Espindola [Sat, 25 Oct 2014 04:06:10 +0000 (04:06 +0000)]
Update the error handling of lib/Linker.
Instead of passing a std::string&, use the new diagnostic infrastructure.
llvm-svn: 220608
Jingyue Wu [Sat, 25 Oct 2014 03:46:16 +0000 (03:46 +0000)]
[NVPTX] aligned byte-buffers for vector return types
Summary:
Fixes PR21100 which is caused by inconsistency between the declared return type
and the expected return type at the call site. The new behavior is consistent
with nvcc and the NVPTXTargetLowering::getPrototype function.
Test Plan: test/Codegen/NVPTX/vector-return.ll
Reviewers: jholewinski
Reviewed By: jholewinski
Subscribers: llvm-commits, meheff, eliben, jholewinski
Differential Revision: http://reviews.llvm.org/D5612
llvm-svn: 220607
Rafael Espindola [Sat, 25 Oct 2014 01:51:19 +0000 (01:51 +0000)]
Make this test a bit stricter by checking clang's output too.
llvm-svn: 220604
Rafael Espindola [Sat, 25 Oct 2014 01:14:15 +0000 (01:14 +0000)]
Add a test for the -suppress-warnings option.
llvm-svn: 220603
Jim Ingham [Sat, 25 Oct 2014 00:33:55 +0000 (00:33 +0000)]
Setting breakpoints with name mask eFunctionNameTypeBase was broken for straight C names by 220432. Get
that working again.
llvm-svn: 220602
Evgeniy Stepanov [Fri, 24 Oct 2014 23:34:15 +0000 (23:34 +0000)]
[msan] Make -msan-check-constant-shadow a bit stronger.
Allow (under the experimental flag) non-Instructions to participate in MSan checks.
llvm-svn: 220601
Rafael Espindola [Fri, 24 Oct 2014 22:50:48 +0000 (22:50 +0000)]
Modernize the error handling of the Materialize function.
llvm-svn: 220600
Kevin Enderby [Fri, 24 Oct 2014 22:39:40 +0000 (22:39 +0000)]
Fix a Mach-O assembler segfault for a subtraction expression with an undefined symbol.
In a Mach-O object file a relocatable expression of the form
SymbolA - SymbolB + constant is allowed when both symbols are
defined in a section. But when either symbol is undefined it
is an error.
The code was crashing when it had an undefined symbol in this case.
And should have printed a error message using the location information
in the relocation entry.
rdar://
18678402
llvm-svn: 220599
Nick Kledzik [Fri, 24 Oct 2014 22:28:54 +0000 (22:28 +0000)]
[mach-o] Support old style objc class names in export lists
Objective-C switched to a new ABI which uses a different mangling for class
names. But to keep projects building that use export lists that use the old
class name mangling, the linker recognizes the old names and transforms them
to the new mangling.
llvm-svn: 220598
Nick Kledzik [Fri, 24 Oct 2014 22:19:22 +0000 (22:19 +0000)]
[mach-o] Support data-only dylibs
In final linked shared images, the __TEXT segment contains both code and
the mach-o header/load-commands. In the case of a data-only dylib, there is
no code, so we need to force the addition of the __TEXT segment.
llvm-svn: 220597
Zachary Turner [Fri, 24 Oct 2014 22:06:29 +0000 (22:06 +0000)]
Implement explicit thread stack size specification on Windows.
llvm-svn: 220596
David Majnemer [Fri, 24 Oct 2014 22:05:27 +0000 (22:05 +0000)]
CodeGen: Don't form weak dllexport aliases
The MS linker cannot do anything interesting with these, it doesn't make
sense to emit them.
This fixes PR21373.
Differential Revision: http://reviews.llvm.org/D5986
llvm-svn: 220595
Frederic Riss [Fri, 24 Oct 2014 21:31:09 +0000 (21:31 +0000)]
Sink DwarfUnit::constructImportedEntityDIE into DwarfCompileUnit.
So that it has access to getOrCreateGlobalVariableDIE. If we ever support
decsribing using directive in C++ classes (thus requiring support in type
units), it will certainly use another mechanism anyway.
Differential Revision: http://reviews.llvm.org/D5975
llvm-svn: 220594
Saleem Abdulrasool [Fri, 24 Oct 2014 21:23:49 +0000 (21:23 +0000)]
test: correct an overzealous search-and-replace
The temporary initialized is referenced as %0, not as the auto-release pool.
Fixes R+A tests.
llvm-svn: 220593
Simon Pilgrim [Fri, 24 Oct 2014 21:04:41 +0000 (21:04 +0000)]
[X86][SSE] Bitcast assertion in XFormVExtractWithShuffleIntoLoad
Minor patch to fix an issue in XFormVExtractWithShuffleIntoLoad where a load is unary shuffled, then bitcast (to a type with the same number of elements) before extracting an element.
An undef was created for the second shuffle operand using the original (post-bitcasted) vector type instead of the pre-bitcasted type like the rest of the shuffle node - this was then causing an assertion on the different types later on inside SelectionDAG::getVectorShuffle.
Differential Revision: http://reviews.llvm.org/D5917
llvm-svn: 220592
Ed Maste [Fri, 24 Oct 2014 20:49:50 +0000 (20:49 +0000)]
Remove duplicated new file content
llvm-svn: 220591
Saleem Abdulrasool [Fri, 24 Oct 2014 20:23:43 +0000 (20:23 +0000)]
CodeGen: correct materialize temporary aggregates in ARC mode
Avoid an assertion when materializing a lifetime type aggregate temporary. When
performing CodeGen for ObjC++, we could generate a lifetime-only aggregate
temporary by using an initializer list (which is effectively an array). We
would reach through the temporary expression, fishing out the inner expression.
If this expression was a lifetime expression, we would attempt to emit this as a
scalar. This would eventually result in an assertion as the emission would
eventually assert that the expression being emitted has a scalar evaluation
kind.
Add a case to handle the aggregate expressions. Use the EmitAggExpr to emit the
aggregate expression rather than the EmitScalarInit.
Addresses PR21347.
llvm-svn: 220590
Richard Smith [Fri, 24 Oct 2014 20:23:01 +0000 (20:23 +0000)]
[modules] Support combining 'textual' with 'private'.
llvm-svn: 220589
David Majnemer [Fri, 24 Oct 2014 20:22:57 +0000 (20:22 +0000)]
Itanium ABI: Template template parameters are usable as substitutions
Template template parameters weren't added to the list of substitutions.
This would make the substitution map contain inaccurate mappings,
leading to Clang violating the Itanium ABI and breaking compatibility
with GCC.
This fixes PR21351.
Differential Revision: http://reviews.llvm.org/D5959
llvm-svn: 220588
Saleem Abdulrasool [Fri, 24 Oct 2014 19:54:32 +0000 (19:54 +0000)]
CodeGen: trivial conversion to range based loop
Switch to a range-based for loop. NFC.
llvm-svn: 220587
Saleem Abdulrasool [Fri, 24 Oct 2014 19:54:29 +0000 (19:54 +0000)]
test: add -std=c++11
This test uses C++11 features (r-value references) in ObjC++. Add a -std=c++11
to silence a warning. NFC.
llvm-svn: 220586
David Majnemer [Fri, 24 Oct 2014 19:49:04 +0000 (19:49 +0000)]
CodeGen: GLValue exprs in template parameters should have reference type
This fixes a corner-case where __uuidof as a template argument would
result in us trying to emit a GLValue as an RValue. This would lead to
a crash down the road.
llvm-svn: 220585
Colin LeMahieu [Fri, 24 Oct 2014 19:00:32 +0000 (19:00 +0000)]
[Hexagon] Resubmission of 220427
Modified library structure to deal with circular dependency between HexagonInstPrinter and HexagonMCInst.
Adding encoding bits for add opcode.
Adding llvm-mc tests.
Removing unit tests.
http://reviews.llvm.org/D5624
llvm-svn: 220584
Jim Ingham [Fri, 24 Oct 2014 18:51:57 +0000 (18:51 +0000)]
Patch from ovyalov@google.com:
Handle pexpect exceptions correctly so that processes spawned with
pexpect are always reaped.
llvm-svn: 220583
Alexey Samsonov [Fri, 24 Oct 2014 18:34:43 +0000 (18:34 +0000)]
Add runtime flag 'symbolize_inline_frames' to disable symbolization of inlined frames done in llvm-symbolizer
llvm-svn: 220582
Matt Arsenault [Fri, 24 Oct 2014 18:13:10 +0000 (18:13 +0000)]
Fix copy paste comment
llvm-svn: 220581
Rafael Espindola [Fri, 24 Oct 2014 18:13:04 +0000 (18:13 +0000)]
Don't ever call materializeAllPermanently during LTO.
To do this, change the representation of lazy loaded functions.
The previous representation cannot differentiate between a function whose body
has been removed and one whose body hasn't been read from the .bc file. That
means that in order to drop a function, the entire body had to be read.
llvm-svn: 220580
Sanjay Patel [Fri, 24 Oct 2014 17:59:18 +0000 (17:59 +0000)]
Allow AVX vrsqrtps generation.
This is a follow-on to r220570 that allows a 256-bit (v8f32)
version of vrsqrtps to be generated.
llvm-svn: 220579
David Blaikie [Fri, 24 Oct 2014 17:57:34 +0000 (17:57 +0000)]
DebugInfo: Sink DwarfDebug::ScopeVariables down into DwarfFile
(part of refactoring to allow subprogram emission in both the skeleton
and main units to enable -gmlt-like data to be included in the skeleton
for live inlined backtracing purposes)
llvm-svn: 220578
Sanjay Patel [Fri, 24 Oct 2014 17:55:59 +0000 (17:55 +0000)]
remove class/function/variable names from comments; NFC
llvm-svn: 220577
Reid Kleckner [Fri, 24 Oct 2014 17:55:29 +0000 (17:55 +0000)]
Fix windows-cross.c test on my machine
I suspect it will need a custom sysroot to pass reliably elsewhere.
llvm-svn: 220576
David Blaikie [Fri, 24 Oct 2014 17:53:38 +0000 (17:53 +0000)]
Remove DwarfDebug::FirstCU as it has no use
It was only being used as a flag to identify the lack of debug info from
within endModule - use the section labels for that instead.
llvm-svn: 220575
Zachary Turner [Fri, 24 Oct 2014 17:51:56 +0000 (17:51 +0000)]
Make ProcessWindows just use Host::LaunchProcess.
llvm-svn: 220574
Reid Kleckner [Fri, 24 Oct 2014 17:42:17 +0000 (17:42 +0000)]
Add frontend support for __vectorcall
Wire it through everywhere we have support for fastcall, essentially.
This allows us to parse the MSVC "14" CTP headers, but we will
miscompile them because LLVM doesn't support __vectorcall yet.
Reviewed By: Aaron Ballman
Differential Revision: http://reviews.llvm.org/D5808
llvm-svn: 220573
Serge Pavlov [Fri, 24 Oct 2014 17:31:32 +0000 (17:31 +0000)]
Use enumerators instead of hardcoded integers when processing macro names.
llvm-svn: 220572
Dmitry Vyukov [Fri, 24 Oct 2014 17:07:29 +0000 (17:07 +0000)]
tsan: support mmap(MAP_32BIT)
Allow user memory in the first TB of address space.
This also enabled non-pie binaries and freebsd.
Fixes issue:
https://code.google.com/p/thread-sanitizer/issues/detail?id=5
llvm-svn: 220571
Sanjay Patel [Fri, 24 Oct 2014 17:02:16 +0000 (17:02 +0000)]
Use rsqrt (X86) to speed up reciprocal square root calcs
This is a first step for generating SSE rsqrt instructions for
reciprocal square root calcs when fast-math is allowed.
For now, be conservative and only enable this for AMD btver2
where performance improves significantly - for example, 29%
on llvm/projects/test-suite/SingleSource/Benchmarks/BenchmarkGame/n-body.c
(if we convert the data type to single-precision float).
This patch adds a two constant version of the Newton-Raphson
refinement algorithm to DAGCombiner that can be selected by any target
via a parameter returned by getRsqrtEstimate()..
See PR20900 for more details:
http://llvm.org/bugs/show_bug.cgi?id=20900
Differential Revision: http://reviews.llvm.org/D5658
llvm-svn: 220570
Benjamin Kramer [Fri, 24 Oct 2014 16:31:42 +0000 (16:31 +0000)]
[Modules] Free modules that failed signature verification.
The control flow and ownership is weird enough so unique_ptr doesn't help here :(
llvm-svn: 220569
Daniel Sanders [Fri, 24 Oct 2014 16:15:27 +0000 (16:15 +0000)]
[mips] Replace MipsABIEnum with a MipsABIInfo class.
Summary:
No functional change yet, it's just an object replacement for an enum.
It will allow us to gather ABI information in a single place so that we can
start testing for properties of the ABI's instead of the ABI itself.
For example we will eventually be able to use:
ABI.MinStackAlignmentInBytes()
instead of:
(isABI_N32() || isABI_N64()) ? 16 : 8
which is clearer and more maintainable.
Reviewers: matheusalmeida
Reviewed By: matheusalmeida
Differential Revision: http://reviews.llvm.org/D3341
llvm-svn: 220568
Benjamin Kramer [Fri, 24 Oct 2014 15:52:05 +0000 (15:52 +0000)]
[Object] Fix MachO's getUuid to return a pointer into the object instead of a dangling ArrayRef.
This works because uuid's are always little endian so it's not swapped.
Fixes use-after-return reported by asan.
llvm-svn: 220567
Daniel Sanders [Fri, 24 Oct 2014 15:30:16 +0000 (15:30 +0000)]
[mips] Mark aggregate arguments passed in registers with the inreg attribute
Summary:
This allows us to easily identify them in the backend which in turn allows us
to handle them correctly for big-endian targets (where they must be shifted
into the upper bits of the register).
Depends on D5961
Reviewers: atanasyan
Reviewed By: atanasyan
Subscribers: cfe-commits, theraven
Differential Revision: http://reviews.llvm.org/D5962
llvm-svn: 220566
Aaron Ballman [Fri, 24 Oct 2014 15:16:39 +0000 (15:16 +0000)]
These functions are not actually defined for NDEBUG or !LLVM_DUMP_ENABLED, so guarding the declarations as well. NFC, silences MSVC warnings in release builds.
llvm-svn: 220565
Daniel Sanders [Fri, 24 Oct 2014 14:46:00 +0000 (14:46 +0000)]
[mips] Fix >80-column line
llvm-svn: 220564
Daniel Sanders [Fri, 24 Oct 2014 14:42:42 +0000 (14:42 +0000)]
[mips] Promote all integral/enumeration types to the GPR width
Summary:
Ensure all integral/enumeration types are appropriately annotated with
signext/zeroext. In particular, i32 now has these attributes when using the
N32/N64 ABI. This paves the way for accurately representing the way the
N32/N64 ABI's promotes integer arguments to i64.
Reviewers: atanasyan
Reviewed By: atanasyan
Subscribers: cfe-commits, theraven
Differential Revision: http://reviews.llvm.org/D5961
llvm-svn: 220563
Olivier Goffart [Fri, 24 Oct 2014 13:52:55 +0000 (13:52 +0000)]
Fix initializing TypeOfTypeLoc
This fixes a crash in the RecursiveASTVisitor on such code
__typeof__(struct F*) var[invalid];
The UnderlyingTInfo of a TypeOfTypeLoc was left uninitialized when
created from ASTContext::getTrivialTypeSourceInfo
This lead to a crash in RecursiveASTVisitor when trying to access it.
llvm-svn: 220562
Daniel Sanders [Fri, 24 Oct 2014 13:49:54 +0000 (13:49 +0000)]
[mips] Remove redundant code in RetCC_MipsN. NFC.
Summary:
i32 is always promoted to i64 so it no longer makes sense to assign i32 to
registers.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5964
llvm-svn: 220561
Benjamin Kramer [Fri, 24 Oct 2014 13:29:21 +0000 (13:29 +0000)]
ASTMatchers: Peel off a layer of indirection from true matcher. NFC.
llvm-svn: 220560
Benjamin Kramer [Fri, 24 Oct 2014 13:29:15 +0000 (13:29 +0000)]
ASTMatchers: for-rangify loops. No functionality change.
llvm-svn: 220559
Benjamin Kramer [Fri, 24 Oct 2014 13:29:07 +0000 (13:29 +0000)]
Add arguments() to CXXConstructExpr so the same interface as with CallExpr can be used.
llvm-svn: 220558
Aaron Ballman [Fri, 24 Oct 2014 13:19:19 +0000 (13:19 +0000)]
Report when a function-try-block does not return a value on all control paths. Fixed PR14620.
llvm-svn: 220557
Daniel Sanders [Fri, 24 Oct 2014 13:09:19 +0000 (13:09 +0000)]
[mips] For N32/N64, structs must be passed in the upper bits of a register.
Summary:
Most structs were fixed by r218451 but those of between >32-bits and
<64-bits remained broken since they were not marked with [ASZ]ExtUpper.
This patch fixes the remaining cases by using
CCPromoteToUpperBitsInType<i64> on i64's in addition to i32 and smaller.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5963
llvm-svn: 220556
Oliver Stannard [Fri, 24 Oct 2014 11:28:47 +0000 (11:28 +0000)]
[Thumb] Clang thinks "char" is signed when using a thumb triple
'char' is unsigned on all ARM and Thumb architectures. Clang gets this
right for ARM, and for thumb when using and arm triple and the -mthumb
option, but gets it wrong for thumb triples. This fixes that.
llvm-svn: 220555
Viktor Kutuzov [Fri, 24 Oct 2014 10:55:03 +0000 (10:55 +0000)]
[Tsan] Do not intercept non-FreeBSD functions on FreeBSD
Differential Revision: http://reviews.llvm.org/D5858
llvm-svn: 220554
Oliver Stannard [Fri, 24 Oct 2014 09:54:41 +0000 (09:54 +0000)]
[AArch64] Fix fast-isel of cbz of i1, i8, i16
This fixes a miscompilation in the AArch64 fast-isel which was
triggered when a branch is based on an icmp with condition eq or ne,
and type i1, i8 or i16. The cbz instruction compares the whole 32-bit
register, so values with the bottom 1, 8 or 16 bits clear would cause
the wrong branch to be taken.
llvm-svn: 220553
Viktor Kutuzov [Fri, 24 Oct 2014 09:27:34 +0000 (09:27 +0000)]
[Tsan] Fix the thread_name tests to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D5855
llvm-svn: 220552
Viktor Kutuzov [Fri, 24 Oct 2014 09:23:06 +0000 (09:23 +0000)]
[Tsan] Intercept pthread_set_name_np on FreeBSD
Differential Revision: http://reviews.llvm.org/D5932
llvm-svn: 220551
Viktor Kutuzov [Fri, 24 Oct 2014 09:20:20 +0000 (09:20 +0000)]
[Tsan] Fix the signal_recursive.cc test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D5841
llvm-svn: 220550
NAKAMURA Takumi [Fri, 24 Oct 2014 08:44:01 +0000 (08:44 +0000)]
[CMake] clangRewrite: Roll back clangAST in libdeps, due to clang::Stmt::printPretty().
llvm-svn: 220549
Timur Iskhodzhanov [Fri, 24 Oct 2014 06:24:07 +0000 (06:24 +0000)]
Update test/MC/ARM/coff-debugging-secrel.ll expectations to fix breakage caused by r220544
llvm-svn: 220548
Saleem Abdulrasool [Fri, 24 Oct 2014 03:24:33 +0000 (03:24 +0000)]
Driver: add missed file from previous commit
llvm-svn: 220547
Saleem Abdulrasool [Fri, 24 Oct 2014 03:13:37 +0000 (03:13 +0000)]
Driver: add CrossWindowsToolChain
This is a very basic toolchain. It supports cross-compiling Windows (primarily
inspired by the WoA target). It is meant to use clang with the LLVM IAS and a
binutils ld-compatible interface for the linker (eventually to be lld). It does
not perform any "standard" GCC lookup, nor does it perform any special
adjustments given that it is expected to be used in an environment where the
user is using MSVCRT (and as such Visual Studio headers) and the Windows SDK.
The primary runtime library is expected to be compiler-rt and the C++
implementation to be libc++.
It also expects that a sysroot has been setup given the usual Unix semantics
(standard C headers in /usr/include, all the import libraries available in
/usr/lib). It also expects that an entry point stub is present in /usr/lib
(crtbegin.obj for executables, crtbeginS.obj for shared libraries).
The entry point stub is responsible for running any GNU constructors.
llvm-svn: 220546
Marcello Maggioni [Fri, 24 Oct 2014 02:46:50 +0000 (02:46 +0000)]
Added reset of LexicalScope in LiveDebugVariables reset function.
llvm-svn: 220545
Timur Iskhodzhanov [Fri, 24 Oct 2014 01:27:45 +0000 (01:27 +0000)]
Fix PR21189 -- Emit symbol subsection required to debug LLVM-built binaries with VS2012+
Reviewed at http://reviews.llvm.org/D5772
llvm-svn: 220544
Nick Lewycky [Fri, 24 Oct 2014 00:49:29 +0000 (00:49 +0000)]
Add a new -fmerge-functions -cc1 flag that enables function merging.
llvm-svn: 220543
David Blaikie [Fri, 24 Oct 2014 00:43:47 +0000 (00:43 +0000)]
DebugInfo: Remove DwarfDebug::addScopeVariable now that it's just a trivial wrapper
llvm-svn: 220542