Commit Graph

210772 Commits

Author SHA1 Message Date
Rui Ueyama 8197a4e0bf COFF: Use parallel_sort in Writer::sortExceptionTable().
This patch saves 4 ms out of 5 ms. Very small improvement,
but maybe better than nothing.

llvm-svn: 248063
2015-09-18 23:17:34 +00:00
Adrian Prantl 666892051c CGDebugInfo: Make creating a skeleton CU in getOrCreateModuleRef optional.
We don't want a skeleton CU when generating debug info for the module
itself.

NFC.

llvm-svn: 248062
2015-09-18 23:01:45 +00:00
Rui Ueyama 49e72e69e5 Fix build error that std::atomic is not copy-constructible.
llvm-svn: 248061
2015-09-18 22:58:12 +00:00
Todd Fiala f77f8ae450 test events: add test_filename to all test-related events.
The test_filename is the full path to the TestCase class's
implementation file.

llvm-svn: 248060
2015-09-18 22:57:04 +00:00
Todd Fiala e83f140833 test events: announce worker count in new initialize event
See the following for details:
http://reviews.llvm.org/D12987

llvm-svn: 248059
2015-09-18 22:45:31 +00:00
Rui Ueyama e629a45531 COFF: Address review comments.
- Fix race condition of `Redo`
- Avoid std::distance

llvm-svn: 248058
2015-09-18 22:31:15 +00:00
Enrico Granata f6fe302ee4 On Linux, if you can't actually locate the libc++ install, do not attempt to use it
The failure mode when one gets this wrong is quite gnarly to then walk oneself out of, and if you can't actually find the library, trying to build against it is fairly pointless anyway
This + my previous skip_if_library_missing change should make running the libc++ tests on a Linux machine without it much more seamless

llvm-svn: 248057
2015-09-18 22:26:34 +00:00
Michael J. Spencer 9779535c5d [elf2] Relocate against undefined weak symbols.
llvm-svn: 248056
2015-09-18 22:26:13 +00:00
Sean Callanan 9077e9f8f2 Moved ResolveSymbolicLink() to the FileSystem where it belongs, thanks
zturner!

http://reviews.llvm.org/D12984

llvm-svn: 248055
2015-09-18 22:24:57 +00:00
Michael J. Spencer 658dccd1c8 [elf2] Relocate against common symbols.
llvm-svn: 248054
2015-09-18 22:13:25 +00:00
Adrian Prantl 0391406e95 Simplify the interface of PCHContainerGenerator and friends
by passing in a CompilerInstance instead of all its individual members.

NFC.

llvm-svn: 248053
2015-09-18 22:10:59 +00:00
Rui Ueyama e0e0796d83 COFF: Parallelize Writer::writeSections().
Self-hosting took 801 ms on my machine. Of which this function took
69 ms. Now it takes 37 ms. That is about 4% overall performance
improvement.

llvm-svn: 248052
2015-09-18 22:07:10 +00:00
Rafael Espindola 54e9d238b6 Relax the test to get it passing with windows paths.
llvm-svn: 248051
2015-09-18 22:01:10 +00:00
Ismail Pazarbasi d347e7a920 Analyzer: Fix a crasher in UbigraphViz
Summary:
Name `Out` refers to the parameter. It is moved into the member `Out`
in ctor-init. Dereferencing null pointer will crash clang, if user
passes '-analyzer-viz-egraph-ubigraph' argument.

Reviewers: zaks.anna, krememek

Subscribers: cfe-commits

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

llvm-svn: 248050
2015-09-18 21:54:47 +00:00
Michael J. Spencer 9567495154 [elf2] Convert if/else cascade into a covered switch. NFC.
llvm-svn: 248049
2015-09-18 21:48:38 +00:00
Sean Callanan db7d8083cd Added support for resolving symbolic links to FileSpec.
We use the symbolic link to resolver to find the target of the LLDB shlib
symlink if there is a symlink.  This allows us to find shlib-relative  resources
even when running under the testsuite, where _lldb.so is a symlink in the Python
resource directory.

Also changed a comment to be slightly more clear about what resolve_path in the
constructor for FileSpec means, since if we were actually using realpath() this
code wouldn't have been necessary.

http://reviews.llvm.org/D12984

llvm-svn: 248048
2015-09-18 21:39:31 +00:00
Keno Fischer c021abfaff Fix Makefile build by adding LLVMSupport to liblldb
`llvm-mi` now depends on the regex functionality available in LLVM's
support library.

llvm-svn: 248047
2015-09-18 21:32:10 +00:00
Eric Christopher c48497a2f8 Reduce indentation in the TargetInfo implementations and fix up
a couple of macro builtin redefines.

llvm-svn: 248046
2015-09-18 21:26:24 +00:00
Sanjoy Das f69d0e3384 [IndVars] Widen more comparisons for non-negative induction vars
Summary:
If an induction variable is provably non-negative, its sign extension is
equal to its zero extension.  This means narrow uses like

  icmp slt iNarrow %indvar, %rhs

can be widened into

  icmp slt iWide zext(%indvar), sext(%rhs)

Reviewers: atrick, mcrosier, hfinkel

Subscribers: hfinkel, reames, llvm-commits

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

llvm-svn: 248045
2015-09-18 21:21:02 +00:00
Rui Ueyama e8d1c59756 Style fix to make it look consistent. NFC.
llvm-svn: 248044
2015-09-18 21:17:44 +00:00
Chris Bieneman cd53780cd4 [CMake] Refactoring and cleaning up clang symlink generation.
Generation of clang symlinks now uses add_clang_symlink macro which uses add_llvm_symlink. Also the list of symlinks to generate is configurable via CLANG_LINKS_TO_CREATE.

This re-lands r248015, with fixes for clang symlinks to always be generated as part of the clang and install-clang targets.

llvm-svn: 248043
2015-09-18 21:15:54 +00:00
Luke Larson e7dba51330 Fix typo and test commit
llvm-svn: 248042
2015-09-18 21:15:45 +00:00
Gabor Horvath dce40c518d [Static Analyzer] General type checker based on dynamic type information.
Differential Revision: http://reviews.llvm.org/D12973

llvm-svn: 248041
2015-09-18 21:15:37 +00:00
Rafael Espindola 34b9ef680f This code never uses r_addend, so it can just use Elf_Rel.
llvm-svn: 248040
2015-09-18 21:12:38 +00:00
Chris Bieneman 895d96a919 [CMake] Adding ALWAYS_GENERATE option to symlink utility functions.
This implements the behavior required for clang symlinks which should be always generated.

llvm-svn: 248039
2015-09-18 21:08:32 +00:00
Rui Ueyama aa95e5a4cc COFF: Parallelize ICF.
The LLD's ICF algorithm is highly parallelizable. This patch does that
using parallel_for_each.

ICF accounted for about one third of total execution time. Previously,
it took 324 ms when self-hosting. Now it takes only 62 ms.

Of course your mileage may vary. My machine is a beefy 24-core Xeon machine,
so you may not see this much speedup. But this optimization should be
effective even for 2-core machine, since I saw speedup (324 ms -> 189 ms)
when setting parallelism parameter to 2.

llvm-svn: 248038
2015-09-18 21:06:34 +00:00
Adrian Prantl 201e10d007 Debug Info: Use the full module name as a key when caching DIModules.
The signature may not have been computed at the time the module reference
is generated (e.g.: in the future while emitting debug info for a clang
module). Using the full module name is safe because each clang module may
only have a single definition.

NFC.

llvm-svn: 248037
2015-09-18 21:06:14 +00:00
Todd Fiala 33896a9872 Adds parallel work queue index to test events, stdout/stderr results support.
See http://reviews.llvm.org/D12983 for details.

llvm-svn: 248036
2015-09-18 21:01:13 +00:00
Rafael Espindola 12d2a39c88 Handle lld not being found in PATH.
llvm-svn: 248035
2015-09-18 20:55:58 +00:00
Nico Weber 4cc796a614 clang-cl: Don't warn on /bigobj flag
LLVM r217812 made it so that clang-cl implicitly creates bigobj files when
needed, independent of this flag. It looks like cl has this flag to produce obj
flags compatible with MSVS 2003's linker by default, something we don't care
about. Since clang-cl always has /bigobj behavior, don't warn that the flag is
unused, just ignore it silently.

llvm-svn: 248034
2015-09-18 20:49:33 +00:00
Rafael Espindola 4859773a95 Yet another try at fixing this at every bot.
This time handle " and - after clang and lld.

llvm-svn: 248033
2015-09-18 20:44:09 +00:00
Davide Italiano 92a5e83528 [Object/ELF] Change comment to reflect reality.
llvm-svn: 248032
2015-09-18 20:41:15 +00:00
Rafael Espindola df1b494404 Relax this test further to pass in other bots.
The problem this time was the /clang matching the InstalledDir line.

Now we just use regular expressions which are more flexible, if a bit less
readable, than CHECK+CHECK-SAME.

llvm-svn: 248031
2015-09-18 20:35:53 +00:00
Cong Hou d40105d321 Update edge weights properly when merging blocks in if-conversion.
In if-conversion, there is a utility function MergeBlocks() that is used to merge blocks. However, when new edges are built in this function the edge weight is either not provided or not updated properly, leading to a modified CFG with incorrect edge weights. This patch corrects this issue.

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

llvm-svn: 248030
2015-09-18 20:22:41 +00:00
Rafael Espindola 9b3ee4bf2c Fix test to pass when the directory name has lld in it.
CHECK-LABEL assumes that there is only one occurrence of the match.

The output looks like:

clang version 3.8.0 (trunk 247999)
....
/path/to/build/dir/bin/clang-3.8 ....

If the path contains lld, the second CHECK-LABEL matches it and we fail since
there is no -cc1as between clang and lld.

llvm-svn: 248029
2015-09-18 20:22:36 +00:00
Enrico Granata 0b5a6e3c08 Make libc++ tests skip themselves if libc++ is not actually loaded in the target
llvm-svn: 248028
2015-09-18 20:12:52 +00:00
Eric Christopher a835956bda Limit the range of processors supported by ARM fast isel to v6 or
later as that's all that is tested right now.

Fixes PR24858.

llvm-svn: 248027
2015-09-18 20:08:18 +00:00
Michael Kruse 84f70acd68 Remove unused variable Dimension [NFC]
llvm-svn: 248026
2015-09-18 20:03:32 +00:00
Chris Bieneman f41fe8b6f8 Revert "[CMake] Refactoring and cleaning up clang symlink generation."
This reverts commit r248015, because it broke bots. I'll revise and recommit.

llvm-svn: 248025
2015-09-18 19:59:51 +00:00
Michael Kruse e2bccbbfb2 Merge IRAccess into MemoryAccess
All MemoryAccess objects will be owned by ScopInfo::AccFuncMap which 
previously stored the IRAccess objects. Instead of creating new 
MemoryAccess objects, the already created ones are reused, but their 
order might be different now. Some fields of IRAccess and MemoryAccess 
had the same meaning and are merged.

This is the last step of fusioning TempScopInfo.{h|cpp} and 
ScopInfo.{h.cpp}. Some refactoring might still make sense.

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

llvm-svn: 248024
2015-09-18 19:59:43 +00:00
Teresa Johnson 92191730f8 Remove couple of new Bitcode enum vals that snuck in via r247927 (NFC)
These are meant to be part of the follow on patch I am sending for
review shortly.

llvm-svn: 248023
2015-09-18 19:38:53 +00:00
Larisse Voufo 532bf7153c Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s parameter MaxInstsToScan. (Complete version of r247497. See D12886)
llvm-svn: 248022
2015-09-18 19:14:35 +00:00
Gabor Horvath c4b28a8f74 [analyzer] A fix for substraction of an integer from a pointer.
Patch by Artem Dergachev!

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

llvm-svn: 248021
2015-09-18 19:13:22 +00:00
James Y Knight e72b0dbf97 Make MachineScheduler debug output less confusing.
At least...a little bit.

llvm-svn: 248020
2015-09-18 18:52:20 +00:00
Davide Italiano f7892a1f3a [ELF2] Constify member functions.
llvm-svn: 248019
2015-09-18 18:28:08 +00:00
Cong Hou f9f9ffb98b Scaling up values in ARMBaseInstrInfo::isProfitableToIfCvt() before they are scaled by a probability to avoid precision issue.
In ARMBaseInstrInfo::isProfitableToIfCvt(), there is a simple cost model in which the number of cycles is scaled by a probability to estimate the cost. However, when the number of cycles is small (which is usually the case), there is a precision issue after the computation. To avoid this issue, this patch scales those cycles by 1024 (chosen to make the multiplication a litter faster) before they are scaled by the probability. Other variables are also scaled up for the final comparison.

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

llvm-svn: 248018
2015-09-18 18:19:40 +00:00
Oleksiy Vyalov 2b38f33b82 Remove unused modules from module cache.
http://reviews.llvm.org/D12971

llvm-svn: 248017
2015-09-18 18:12:39 +00:00
Chris Bieneman bca3d933ce [CMake] Set CLANG_LINKS_TO_CREATE in Apple-stage2.cmake so that we create cc and c++ links.
llvm-svn: 248016
2015-09-18 18:11:18 +00:00
Chris Bieneman 8a1030db9f [CMake] Refactoring and cleaning up clang symlink generation.
Generation of clang symlinks now uses add_clang_symlink macro which uses add_llvm_symlink. Also the list of symlinks to generate is configurable via CLANG_LINKS_TO_CREATE.

llvm-svn: 248015
2015-09-18 18:09:15 +00:00
Renato Golin 7716df5b7d Disable final MSAN test in AArch64 to get the bots green
llvm-svn: 248014
2015-09-18 18:02:55 +00:00