Commit Graph

155015 Commits

Author SHA1 Message Date
Alexey Samsonov 3211e61b6d Store compile unit corresponding to each chain of inlined debug info entries. No functionality change.
llvm-svn: 187792
2013-08-06 10:49:15 +00:00
Elena Demikhovsky 63bd63e4a3 LLVM Interpreter: fixed bug 16694
fix for: Bug 16694 - ExecutionEngine/test-interp-vec-loadstore.ll failing on powerpc-darwin8 (http://llvm.org/bugs/show_bug.cgi?id=16694)
The ExecutionEngine/test-interp-vec-loadstore.ll test has been failing on powerpc-darwin8 (on other platforms it passed)

the reason of fail was wrong output by printf. this output is checked by FileCheck, but on little-endian powerpc the output numeric data were printed inside out and FileCheck reported fail.
the printfs have been replaced by checking data inside test and numeric output has been replaced by the text output like : "int test passed, float test passed". The text output is checked by FileCheck.
the dependency on data layout has been removed.

done by Yuri Veselov (Intel)

llvm-svn: 187791
2013-08-06 10:40:45 +00:00
Alexey Samsonov c2e008734b Add LLVM-style RTTI to DIContext/DWARFContext classes
llvm-svn: 187790
2013-08-06 10:32:39 +00:00
Evgeniy Stepanov 03c0281a17 [sanitizer] Fix NULL arg handling in setitimer/getitimer interceptors.
llvm-svn: 187789
2013-08-06 09:54:33 +00:00
Evgeniy Stepanov 9f05e5e533 [sanitizer] Intercept sched_getaffinity.
llvm-svn: 187788
2013-08-06 09:29:01 +00:00
Tim Northover a4415854db Refactor isInTailCallPosition handling
This change came about primarily because of two issues in the existing code.
Niether of:

define i64 @test1(i64 %val) {
  %in = trunc i64 %val to i32
  tail call i32 @ret32(i32 returned %in)
  ret i64 %val
}

define i64 @test2(i64 %val) {
  tail call i32 @ret32(i32 returned undef)
  ret i32 42
}

should be tail calls, and the function sameNoopInput is responsible. The main
problem is that it is completely symmetric in the "tail call" and "ret" value,
but in reality different things are allowed on each side.

For these cases:
1. Any truncation should lead to a larger value being generated by "tail call"
   than needed by "ret".
2. Undef should only be allowed as a source for ret, not as a result of the
   call.

Along the way I noticed that a mismatch between what this function treats as a
valid truncation and what the backends see can lead to invalid calls as well
(see x86-32 test case).

This patch refactors the code so that instead of being based primarily on
values which it recurses into when necessary, it starts by inspecting the type
and considers each fundamental slot that the backend will see in turn. For
example, given a pathological function that returned {{}, {{}, i32, {}}, i32}
we would consider each "real" i32 in turn, and ask if it passes through
unchanged. This is much closer to what the backend sees as a result of
ComputeValueVTs.

Aside from the bug fixes, this eliminates the recursion that's going on and, I
believe, makes the bulk of the code significantly easier to understand. The
trade-off is the nasty iterators needed to find the real types inside a
returned value.

llvm-svn: 187787
2013-08-06 09:12:35 +00:00
Serge Pavlov 71044cbe16 Unbreak Debug build on Windows
llvm-svn: 187786
2013-08-06 08:44:18 +00:00
Larisse Voufo b9737e314c Update status of support for variable templates on website.
llvm-svn: 187785
2013-08-06 07:37:09 +00:00
Larisse Voufo 833b05a273 A bit of clean up based on peer's feedback...
llvm-svn: 187784
2013-08-06 07:33:00 +00:00
Craig Topper cf969eadaf Simplify vector lane handling math a bit. No functional change intended.
llvm-svn: 187783
2013-08-06 07:23:12 +00:00
Richard Smith 49ca8aab58 PR16755: When initializing or modifying a bitfield member in a constant
expression, truncate the stored value to the size of the bitfield.

llvm-svn: 187782
2013-08-06 07:09:20 +00:00
Craig Topper 7418ff460c Simplify math a little bit.
llvm-svn: 187781
2013-08-06 06:54:25 +00:00
NAKAMURA Takumi aaf66c7357 Target/*/CMakeLists.txt: Add the dependency to CommonTableGen explicitly for each corresponding CodeGen.
Without explicit dependencies, both per-file action and in-CommonTableGen action could run in parallel.
It races to emit *.inc files simultaneously.

llvm-svn: 187780
2013-08-06 06:38:37 +00:00
Craig Topper 9bc00b65b6 Replace EVT with MVT in isHorizontalBinOp as it is only called with legal types.
llvm-svn: 187779
2013-08-06 06:05:05 +00:00
NAKAMURA Takumi e359e85649 AsmPrinter/CMakeLists.txt: Add explicit dependency to intrinsics_gen here.
llvm-svn: 187778
2013-08-06 05:56:39 +00:00
NAKAMURA Takumi 752f1ec651 Option/CMakeLists.txt: Don't use target_link_libraries. LLVMBuild knows dependencies.
llvm-svn: 187777
2013-08-06 05:56:32 +00:00
Larisse Voufo b959c3c6ae Removed hack that was used to properly restore the nested name specifier of qualified variable template ids. It turns out that the current implementation was just not logical setup for it. This commit has made it so.
llvm-svn: 187776
2013-08-06 05:49:26 +00:00
Craig Topper 5ba12d75df Put an llvm_unreachable at the end of getSplatIndex as its loop should never find all undef elements.
llvm-svn: 187775
2013-08-06 05:41:22 +00:00
Craig Topper 770547db15 Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles to better code and is equivalent for shuffle indices.
llvm-svn: 187774
2013-08-06 05:07:37 +00:00
Craig Topper 7d60e7ca7f Remove trailing whitespace and fix an 80-column violation. No functional change.
llvm-svn: 187773
2013-08-06 05:01:21 +00:00
Tobias Grosser 22a155a7a6 ScopInfo: add a testcase that share parameters within nested start.
Contributed-by:  Star Tan <tanmx_star@yeah.net>
llvm-svn: 187772
2013-08-06 04:36:45 +00:00
Craig Topper 47d7c5c8fe Simplify code slightly. No functional change.
llvm-svn: 187771
2013-08-06 04:12:40 +00:00
Larisse Voufo 4154f46c5a Fixing commit r187768: Moved diagnosis of forward declarations of variable templates from Parser to Sema.
llvm-svn: 187770
2013-08-06 03:57:41 +00:00
Richard Trieu 08d5085d43 Fix for PR16570: when comparing two function pointers, discard qualifiers when
comparing non-reference function parameters.  The qualifiers don't matter for
comparisons.

llvm-svn: 187769
2013-08-06 03:44:10 +00:00
Larisse Voufo 21de36ba66 Moved diagnosis of forward declarations of variable templates from Parser to Sema.
llvm-svn: 187768
2013-08-06 03:43:07 +00:00
NAKAMURA Takumi cecdabb0bf clang/test/Driver/crash-report.c: Mark it as XFAIL:mingw32, for now. Investigating.
I met a message, "fatal error: file 'nul' modified since it was first processed".

llvm-svn: 187767
2013-08-06 03:31:55 +00:00
NAKAMURA Takumi b7d270cce5 AST/DeclTemplate.h: Possibly fix a warning. [-Wuninitialized]
FIXME: Would '0' be an appropriate value in SequenceNumber?
llvm-svn: 187766
2013-08-06 03:29:01 +00:00
NAKAMURA Takumi 8c2d367dcd SemaTemplateInstantiateDecl.cpp: Suppress a warning. [-Wunused-variable]
llvm-svn: 187765
2013-08-06 03:28:54 +00:00
Tom Stellard aa664d9b92 Factor FlattenCFG out from SimplifyCFG
Patch by: Mei Ye

llvm-svn: 187764
2013-08-06 02:43:45 +00:00
Eric Christopher f7d848d0b9 Allow 4 as a valid debug info version.
llvm-svn: 187763
2013-08-06 01:38:27 +00:00
Larisse Voufo 39a1e507ff Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...
llvm-svn: 187762
2013-08-06 01:03:05 +00:00
Shuxin Yang 6f7213cb93 Add some comment to LTOCodeGenerator class
llvm-svn: 187761
2013-08-06 00:45:32 +00:00
Hans Wennborg 6ee64d52cf clang-cl: Implement the /Tc, /TC, /Tp and /TP options.
These are used to specify source files, and whether to treat source
files as C or C++.

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

llvm-svn: 187760
2013-08-06 00:20:31 +00:00
John Thompson 428ad10623 Add test for header guard work-around.
llvm-svn: 187759
2013-08-06 00:17:40 +00:00
Matt Arsenault ff7dc7248e Fix missing -*- C++ -*-s
llvm-svn: 187758
2013-08-06 00:16:21 +00:00
John Thompson 48df096c3f Fixed uninitialized member, plus recommit of 187736.
llvm-svn: 187757
2013-08-05 23:55:14 +00:00
Bill Wendling dc17270968 FileCheckize some of the testcases.
llvm-svn: 187756
2013-08-05 23:43:18 +00:00
Bill Wendling 7c8a4a4346 Fix grammar.
llvm-svn: 187755
2013-08-05 23:29:16 +00:00
Tom Stellard eef2ad92c7 R600/SI: Add missing test for r187749
llvm-svn: 187754
2013-08-05 22:45:56 +00:00
David Majnemer 89594f3733 [ms-cxxabi] Properly mangle member pointers
There were three things missing from the original implementation:

- We would omit the 'E' qualifier for members int 64-bit mode.
- We would not exmaine the qualifiers in 'IsMember' mode.
- We didn't generate the correct backref to the base class.

llvm-svn: 187753
2013-08-05 22:43:06 +00:00
Eric Christopher 0062f2edc0 Recommit previous cleanup with a fix for c++98 ambiguity.
llvm-svn: 187752
2013-08-05 22:32:28 +00:00
David Majnemer 0db0ca4364 [ms-cxxabi] Handle template-template arguments
Template-template arguments appear to be a rather simple encoding of the
template's templated tag type.

llvm-svn: 187751
2013-08-05 22:26:46 +00:00
Tom Stellard 28d06de6f6 R600: Implement TargetLowering::getVectorIdxTy()
We use MVT::i32 for the vector index type, because we use 32-bit
operations to caculate offsets when dynamically indexing vectors.

llvm-svn: 187749
2013-08-05 22:22:07 +00:00
Tom Stellard d42c594960 TargetLowering: Add getVectorIdxTy() function v2
This virtual function can be implemented by targets to specify the type
to use for the index operand of INSERT_VECTOR_ELT, EXTRACT_VECTOR_ELT,
INSERT_SUBVECTOR, EXTRACT_SUBVECTOR.  The default implementation returns
the result from TargetLowering::getPointerTy()

The previous code was using TargetLowering::getPointerTy() for vector
indices, because this is guaranteed to be legal on all targets.  However,
using TargetLowering::getPointerTy() can be a problem for targets with
pointer sizes that differ across address spaces.  On such targets,
when vectors need to be loaded or stored to an address space other than the
default 'zero' address space (which is the address space assumed by
TargetLowering::getPointerTy()), having an index that
is a different size than the pointer can lead to inefficient
pointer calculations, (e.g. 64-bit adds for a 32-bit address space).

There is no intended functionality change with this patch.

llvm-svn: 187748
2013-08-05 22:22:01 +00:00
Eric Christopher 432c99af0b Revert "Use existing builtin hashing functions to make this routine more"
This reverts commit r187745.

llvm-svn: 187747
2013-08-05 22:07:30 +00:00
Arnold Schwaighofer 30448e607e Reverting r187736. It broke some public bots:
http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/10248
http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/3327

llvm-svn: 187746
2013-08-05 22:03:41 +00:00
Eric Christopher d728355a1c Use existing builtin hashing functions to make this routine more
simple.

llvm-svn: 187745
2013-08-05 22:00:50 +00:00
Eric Christopher 0369ad7053 Change parent hashing algorithm to be non-recursive and elaborate
greatly on many comments in the code.

llvm-svn: 187742
2013-08-05 21:40:57 +00:00
David Majnemer ae465ef7cc [ms-cxxabi] Mangle nullptr template arguments
MSVC mangles nullptr template arguments identically to zero literals.

llvm-svn: 187741
2013-08-05 21:33:59 +00:00
Marshall Clow 0c37cfd8b8 Implement NULL iterators for <list> re: N3644
llvm-svn: 187740
2013-08-05 21:23:28 +00:00