Commit Graph

210675 Commits

Author SHA1 Message Date
Nathan Wilson a46106b358 [Concepts] Moving tests to match the corresponding section of the TS
llvm-svn: 247966
2015-09-18 02:50:53 +00:00
Rui Ueyama 603d51104b COFF: Reorder comparisons.
This change makes equalsConstant a bit faster (193ms -> 163ms).

llvm-svn: 247965
2015-09-18 02:40:54 +00:00
Rui Ueyama 8c73dfb6bf COFF: Remove useless micro-optimization.
This patch simplifies code by removing micro-optimization that doesn't
contribute to speed.

llvm-svn: 247964
2015-09-18 02:15:34 +00:00
Rui Ueyama c9a6e827bd COFF: Optimize ICF by not creating temporary vectors.
Previously, ICF created a vector for each SectionChunk. The vector
contained pointers to successors, which are namely associative sections
and COMDAT relocation targets. The reason I created vectors is because
I thought that that would make section comparison faster.

It did make the comparison faster. When self-linking, for example, it
saved about 10 ms on each iteration. The time we spent on constructing
the vectors was 124 ms. If we iterate more than 12 times, return from
the investment exceeds the initial cost.

In reality, it usually needs 5 iterations. So we shouldn't construct
the vectors.

llvm-svn: 247963
2015-09-18 01:51:37 +00:00
Todd Fiala 038bf833c4 Fixed test runner output for Jenkins xUnit publish
The Jenkins JUnit publisher handled our output, but
the Jenkins xUnit plugin's JUnit support did not like
that we didn't have a <testsuites> element wrapping
everything.  They both work with this fix.

llvm-svn: 247962
2015-09-18 01:43:08 +00:00
Rui Ueyama 7d8263bf1d COFF: Optimize ICF by comparing relocations before section contents.
equalsConstants() is the heaviest function in ICF, and that consumes
more than half of total ICF execution time. Of which, section content
comparison accounts for roughly one third.

Previously, we compared section contents at the beginning of the
function after comparing their checksums. The comparison is very
likely to succeed because when the control reaches that comparison,
their checksums are always equal. And because checksums are 64-bit
CRC, they are unlikely to collide.

We compared relocations and associative sections after that.
If they are different, the time we spent on byte-by-byte comparison
of section contents were wasted.

This patch moves the comparison at the end of function. If the
comparison fails, the time we spent on relocation comparison are
wasted, but as I wrote it's very unlikely to happen.

LLD took 1198 ms to link itself to produce a 27.11 MB executable.
Of which, ICF accounted for 536 ms. This patch cuts it by 90 ms,
which is 17% speedup of ICF and 7.5% speedup overall. All numbers
are median of ten runs.

llvm-svn: 247961
2015-09-18 01:30:56 +00:00
Davide Italiano b5b47b432b [ELF2] Fill up local symbols fields correctly.
Differential Revision:	http://reviews.llvm.org/D12944

llvm-svn: 247960
2015-09-18 01:08:17 +00:00
NAKAMURA Takumi 097ce205b0 clang/test/Driver/myriad-toolchain.c: Tweak for DOSish path.
llvm-svn: 247959
2015-09-18 01:02:50 +00:00
Quentin Colombet b4c6886215 [ShrinkWrap] Refactor the handling of infinite loop in the analysis.
- Strenghten the logic to be sure we hoist the restore point out of the current
  loop. (The fixes a bug with infinite loop, added as part of the patch.)
- Walk over the exit blocks of the current loop to conver to the desired restore
  point in one iteration of the update loop.

llvm-svn: 247958
2015-09-17 23:21:34 +00:00
Enrico Granata 0b6003f3e6 Make LanguageRuntime::GetDynamicTypeAndAddress return a ValueType
For C++ and ObjC, dynamic values are always (at least somewhat) pointer-like in nature, so a ValueType of scalar is actually good enough that it could originally be hardcoded as the right choice
Other languages, might have broader notions of things that are dynamic (e.g. a language where a value type can be dynamic). In those cases, it might actually be the case that a dynamic value is a pointer-to the data, or even a host address if dynamic expression results entirely in host space are being talked about

This patch enables the language runtime to make that decision, and makes ValueObjectDynamicValue comply with it

llvm-svn: 247957
2015-09-17 22:56:38 +00:00
Rui Ueyama 4151972c22 Enable extra LTO verification only when build type is debug.
llvm-svn: 247956
2015-09-17 22:54:08 +00:00
Davide Italiano 096cda11fc [llvm-readobj] Fix another "time of check to time of use bug".
It seems there's more copy-paste between tools than needed.

llvm-svn: 247954
2015-09-17 22:29:58 +00:00
Greg Clayton 56939cb310 TypeSystem is now a plugin interface and removed any "ClangASTContext &Class::GetClangASTContext()" functions.
This cleans up type systems to be more pluggable. Prior to this we had issues:
- Module, SymbolFile, and many others has "ClangASTContext &GetClangASTContext()" functions. All have been switched over to use "TypeSystem *GetTypeSystemForLanguage()"
- Cleaned up any places that were using the GetClangASTContext() functions to use TypeSystem
- Cleaned up Module so that it no longer has dedicated type system member variables:
    lldb::ClangASTContextUP     m_ast;          ///< The Clang AST context for this module.
    lldb::GoASTContextUP        m_go_ast;       ///< The Go AST context for this module.
    
    Now we have a type system map:
    
    typedef std::map<lldb::LanguageType, lldb::TypeSystemSP> TypeSystemMap;
    TypeSystemMap               m_type_system_map;    ///< A map of any type systems associated with this module
- Many places in code were using ClangASTContext static functions to place with CompilerType objects and add modifiers (const, volatile, restrict) and to make typedefs, L and R value references and more. These have been made into CompilerType functions that are abstract:

    class CompilerType
    {
    ...
    
    //----------------------------------------------------------------------
    // Return a new CompilerType that is a L value reference to this type if
    // this type is valid and the type system supports L value references,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    GetLValueReferenceType () const;

    //----------------------------------------------------------------------
    // Return a new CompilerType that is a R value reference to this type if
    // this type is valid and the type system supports R value references,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    GetRValueReferenceType () const;

    //----------------------------------------------------------------------
    // Return a new CompilerType adds a const modifier to this type if
    // this type is valid and the type system supports const modifiers,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    AddConstModifier () const;

    //----------------------------------------------------------------------
    // Return a new CompilerType adds a volatile modifier to this type if
    // this type is valid and the type system supports volatile modifiers,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    AddVolatileModifier () const;

    //----------------------------------------------------------------------
    // Return a new CompilerType adds a restrict modifier to this type if
    // this type is valid and the type system supports restrict modifiers,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    AddRestrictModifier () const;

    //----------------------------------------------------------------------
    // Create a typedef to this type using "name" as the name of the typedef
    // this type is valid and the type system supports typedefs, else return
    // an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    CreateTypedef (const char *name, const CompilerDeclContext &decl_ctx) const;
    
    };
    
Other changes include:
- Removed "CompilerType TypeSystem::GetIntTypeFromBitSize(...)" and CompilerType TypeSystem::GetFloatTypeFromBitSize(...) and replaced it with "CompilerType TypeSystem::GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding, size_t bit_size);"
- Fixed code in Type.h to not request the full type for a type for no good reason, just request the forward type and let the type expand as needed

llvm-svn: 247953
2015-09-17 22:23:34 +00:00
David Blaikie 6a51dbdb3c [opaque pointer types] Add an explicit pointee type to alias records in the IR
Since aliases actually use and verify their explicit type already, no
further invalid testing is required here. The
invalid.test:ALIAS-TYPE-MISMATCH case catches errors due to emitting a
non-pointee type in the new format or a non-pointer type in the old
format.

llvm-svn: 247952
2015-09-17 22:18:59 +00:00
Alexei Starovoitov bf19a11116 [bpf] expand indirect branches
BPF instruction set doesn't have indirect branches. Expand them.

Reported by John Fastabend.

llvm-svn: 247951
2015-09-17 22:18:08 +00:00
Rafael Espindola 8315b1c995 Remove dead member variable.
llvm-svn: 247949
2015-09-17 21:34:32 +00:00
Douglas Katzman b1278f3349 [Myriad]: add "<sysroot>/include" to standard search path
llvm-svn: 247948
2015-09-17 21:20:16 +00:00
Michael J. Spencer 879b597b9d [elf2] Extend program-header-layout.s to check that read only sections are correctly merged into the first PT_LOAD.
llvm-svn: 247947
2015-09-17 21:19:56 +00:00
Michael J. Spencer 55f56320c7 [elf2] Fix dynamic-reloc.s test.
The offset of the .rela.dyn section isn't the same between hosts because a path comes before it. This test doesn't care what the offset is.

llvm-svn: 247946
2015-09-17 21:13:41 +00:00
Matthias Braun 3e86de1acb Revert "(HEAD -> master, origin/master, origin/HEAD) RegisterPressure: Move LiveInRegs/LiveOutRegs from RegisterPressure to PressureTracker"
This reverts commit r247943.

Accidental commit, code review was not finished yet.

llvm-svn: 247945
2015-09-17 21:12:24 +00:00
David Majnemer 163b7f121c [WinEH] Fix tests broken by funclet-layout
llvm-svn: 247944
2015-09-17 21:11:12 +00:00
Matthias Braun 70eff2571f RegisterPressure: Move LiveInRegs/LiveOutRegs from RegisterPressure to PressureTracker
Differential Revision: http://reviews.llvm.org/D12814

llvm-svn: 247943
2015-09-17 21:10:06 +00:00
Matthias Braun d78ee54a54 MachineScheduler: Provide an option for node hiding cutoff and disable it by default
llvm-svn: 247942
2015-09-17 21:09:59 +00:00
Charles Davis c7d5c94f78 Support __builtin_ms_va_list.
Summary:
This change adds support for `__builtin_ms_va_list`, a GCC extension for
variadic `ms_abi` functions. The existing `__builtin_va_list` support is
inadequate for this because `va_list` is defined differently in the Win64
ABI vs. the System V/AMD64 ABI.

Depends on D1622.

Reviewers: rsmith, rnk, rjmccall

CC: cfe-commits

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

llvm-svn: 247941
2015-09-17 20:55:33 +00:00
Joerg Sonnenberger 1bbfa7f9d7 [SPARC] Add mulscc.
llvm-svn: 247940
2015-09-17 20:54:26 +00:00
Adrian McCarthy ab59a0f6e7 Get the process ID from a minidump.
llvm-svn: 247939
2015-09-17 20:52:29 +00:00
Sanjay Patel 5dd66c3ca2 fix typo; NFC
llvm-svn: 247938
2015-09-17 20:51:50 +00:00
David Majnemer 978902309a [WinEH] Add a funclet layout pass
Windows EH funclets need to be contiguous.  The FuncletLayout pass will
ensure that the funclets are together and begin with a funclet entry MBB.

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

llvm-svn: 247937
2015-09-17 20:45:18 +00:00
Reid Kleckner 5b8a46e771 [WinEH] Make funclet return instrs pseudo instrs
This makes catchret look more like a branch, and less like a weird use
of BlockAddress. It also lets us get away from
llvm.x86.seh.restoreframe, which relies on the old parentfpoffset label
arithmetic.

llvm-svn: 247936
2015-09-17 20:43:47 +00:00
Piotr Padlewski a4d43337d4 gvn small fix
http://reviews.llvm.org/D12928

llvm-svn: 247935
2015-09-17 20:34:22 +00:00
Simon Pilgrim 61116ddc7b [InstCombine] Added vector demanded bits support for SSE4A EXTRQ/INSERTQ instructions
The SSE4A instructions EXTRQ/INSERTQ only use the lower 64-bits (or less) for many of their input vector operands and all of them have undefined upper 64-bits results.

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

llvm-svn: 247934
2015-09-17 20:32:45 +00:00
Piotr Padlewski b83278687d Using MD_invariant_group
http://reviews.llvm.org/D12927

llvm-svn: 247933
2015-09-17 20:25:46 +00:00
Douglas Katzman e793f19831 Try to unbreak windows compiler after r247926.
It might not like {} implicitly cast to an Arrayref.
That's the theory, since I can't test it.

llvm-svn: 247932
2015-09-17 20:25:09 +00:00
Piotr Padlewski ea09288ee7 Added MD_invariant_group to LLVMContext
http://reviews.llvm.org/D12926

llvm-svn: 247931
2015-09-17 20:25:07 +00:00
Artem Belevich 4ea96421d1 Fixed the comment to match reality.
llvm-svn: 247930
2015-09-17 20:19:33 +00:00
Zachary Turner 8d8033c3b4 Fix a race condition when terminating inferiors on Windows.
If a breakpoint was hit in the inferior after shutdown had
started but before it was complete, it would cause an unclean
terminate of the inferior, leading to various problems the most
visible of which is that handles to the inferior executable would
remain locked, and the test suite would fail to run subsequent
tests because it could not recompile the inferior.

This fixes a major source of flakiness in the test suite.

llvm-svn: 247929
2015-09-17 20:18:50 +00:00
Tobias Grosser 6f36d9ab01 Delinearize multi-dimensional arrays through bitcasts
In some cases instcombine introduces bitcasts that slightly obfuscate the
multi-dimensionality of an array. This patch teaches our fixed-size
delinearization how to look through bitcasts.

llvm-svn: 247928
2015-09-17 20:16:21 +00:00
Teresa Johnson ff642b9b84 Restore "Function bitcode index in Value Symbol Table and lazy reading support"
This reverts commit r247898 (which reverted r247894).

Patch fixed to address two issues exposed by buildbots:
- unused variable warning in NDEBUG mode
- std::initializer_list lifetime issue causing test failures

Original Summary:
Support for including the function bitcode indices in the Value Symbol
Table. This requires writing the VST after the function blocks, which in
turn requires a new VST forward declaration record encoding the offset of
the full VST (which is backpatched to contain the offset after the VST
is written).

This patch also enables the lazy function reader to use the new function
indices out of the VST. This support will be used by ThinLTO as well, which
will be in a follow on patch. Backwards compatibility with older bitcode
files is maintained.

A new test is also included.

The bitcode format (used for the lazy reader as well as the upcoming
ThinLTO patches) came out of discussions with Duncan and others and is
described here:
https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view

Reviewers: dexonsmith, davidxl, joker.eph

Subscribers: llvm-commits

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

llvm-svn: 247927
2015-09-17 20:12:00 +00:00
Douglas Katzman cbd00723b4 [Shave]: Rename test file from 'shave-' to 'myriad-'
llvm-svn: 247926
2015-09-17 20:00:09 +00:00
Michael J. Spencer 2f0082424f [elf2] Combine adjacent compatible OutputSections in PT_LOADs.
llvm-svn: 247925
2015-09-17 19:58:07 +00:00
Douglas Katzman d6e597c2be [Shave]: Drive sparc-myriad-elf-ld directly rather than via gcc.
Differential Revision: http://reviews.llvm.org/D12541

llvm-svn: 247924
2015-09-17 19:56:40 +00:00
Paul Herman f6681b4ace Fix caching for clang::Decl in DWARFASTParserClang
Reviewers: sivachandra, chaoren, clayborg, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 247923
2015-09-17 19:32:02 +00:00
Todd Fiala 5493e31be0 Adjustments to syncsource.py.
- renamed sync-source.py to syncsource.py to appease pylint.
- added missing lib/transfer/__init__.py file.  Fumble from
  git to svn.
- adjusted README to call sync-source.py syncsource.py, and
  call .sync-sourcerc .syncsourcerc.
- marked syncsource.py as executable by all.

llvm-svn: 247922
2015-09-17 19:23:50 +00:00
Evgeniy Stepanov 6e663a1e32 Revert "ubsan: Implement memory permission validation for vtables."
This reverts r247484 and two follow-up commits.
Breaks ppc and x86_64 sanitizer bots.

llvm-svn: 247921
2015-09-17 19:15:54 +00:00
Diego Novillo d2e2137b4c Temporarily fix gcov failures in big-endian hosts.
This test uses a gcov file generated in a little-endian host. The gcov
reader does not allow different endianness, so the test fails on big
endian hosts.

XFAILing for now.

llvm-svn: 247920
2015-09-17 19:05:48 +00:00
Sanjoy Das 7a9f8bb995 [SCEV] Use auto instead of full iterator type; NFCI.
llvm-svn: 247919
2015-09-17 19:04:09 +00:00
Sanjoy Das ab39039a2f [SCEV] Don't repeat method/field names in comment in header; NFC.
llvm-svn: 247918
2015-09-17 19:04:03 +00:00
Bruce Mitchener 71d5fe3b11 Remove unused includes from clang in DataFormatters.
Reviewers: granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 247916
2015-09-17 18:46:22 +00:00
Bruce Mitchener 59b5a37db0 DataFormatters: Rename clang_type to compiler_type.
Reviewers: granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 247915
2015-09-17 18:43:40 +00:00
Chaoren Lin 1b2ba431e0 Fix TestMiSymbol for gcc-4.9 test.
llvm-svn: 247914
2015-09-17 18:38:55 +00:00