Benjamin Kramer
30c35d5305
Revert "BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with a branch probability."
...
This reverts commit r184584. Breaks PPC selfhost.
llvm-svn: 184590
2013-06-21 20:20:27 +00:00
Benjamin Kramer
3315e168ee
BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with a branch probability.
...
Zero is used by BlockFrequencyInfo as a special "don't know" value. It also
causes a sink for frequencies as you can't ever get off a zero frequency with
more multiplies.
This recovers a 10% regression on MultiSource/Benchmarks/7zip. A zero frequency
was propagated into an inner loop causing excessive spilling.
PR16402.
llvm-svn: 184584
2013-06-21 19:30:05 +00:00
Justin Holewinski
26b66eafe7
[NVPTX] Add support for selecting CUDA vs OCL mode based on triple
...
IR for CUDA should use "nvptx[64]-nvidia-cuda", and IR for NV OpenCL should use "nvptx[64]-nvidia-nvcl"
llvm-svn: 184579
2013-06-21 18:51:49 +00:00
Rafael Espindola
ca881d57f8
Add another fixme.
...
llvm-svn: 184488
2013-06-20 22:07:53 +00:00
Rafael Espindola
9636a2717e
Remove last use of PathV1.h from Archive.cpp.
...
llvm-svn: 184484
2013-06-20 22:02:10 +00:00
Rafael Espindola
932ff464b9
make getLastModificationTime const. Move it with the other getters.
...
llvm-svn: 184478
2013-06-20 21:51:49 +00:00
Rafael Espindola
695308b067
Add a setLastModificationAndAccessTime to PathV2.
...
With this we can remove the last use of PathV1 from llvm-ar.cpp.
llvm-svn: 184464
2013-06-20 20:56:14 +00:00
Rafael Espindola
ffbd9ee39f
Add support for getting the last modification time from a file_status.
...
Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus.
llvm-svn: 184450
2013-06-20 18:42:04 +00:00
Evgeniy Stepanov
be5fa31841
Fix get_magic() handling of short reads.
...
PR16389
llvm-svn: 184434
2013-06-20 15:56:05 +00:00
Rafael Espindola
dc37cdb22d
Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.
...
llvm-svn: 184431
2013-06-20 15:06:35 +00:00
Evgeniy Stepanov
0d9af4e442
Remove MSan hack that is no longer needed.
...
llvm-svn: 184428
2013-06-20 14:19:10 +00:00
Argyrios Kyrtzidis
5fc60f0cfb
[Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear the thread-local "CurrentContext"
...
in the "parent" thread, when we are using CrashRecoveryContext::RunSafelyOnThread.
When using CrashRecoveryContext::RunSafelyOnThread, we would set a CrashRecoveryContextImpl* to a thread-local variable
for the "child" thread, but CrashRecoveryContext would erroneously clear it in the "parent" thread.
The result was that if CrashRecoveryContext::RunSafelyOnThread was called again in the "child" thread it would mess up
crash-recovery for its parent.
A test for this will be added in the clang repository.
rdar://14204560
llvm-svn: 184380
2013-06-19 22:53:45 +00:00
Michael Gottesman
649738ce71
[APFloat] Converted all references to APFloat::isNormal => APFloat::isFiniteNonZero.
...
Turns out all the references were in llvm and not in clang.
llvm-svn: 184356
2013-06-19 21:23:18 +00:00
Aaron Ballman
406fa22a89
Modified the implementation of fs::GetUniqueID on Windows such that it actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID.
...
llvm-svn: 184351
2013-06-19 21:03:50 +00:00
Rafael Espindola
8db1ef8cde
Remove Path::getDirectoryContents.
...
llvm-svn: 184311
2013-06-19 15:32:37 +00:00
Rafael Espindola
24a81dcac4
Remove Path::isObjectFile.
...
llvm-svn: 184305
2013-06-19 14:25:38 +00:00
Rafael Espindola
9f3be55a57
Remove Path::canExecute.
...
llvm-svn: 184298
2013-06-19 13:25:31 +00:00
Michael Gottesman
f89e76a9ad
Fixed comment typo that causes the given comment to actually make sense.
...
llvm-svn: 184286
2013-06-19 07:34:21 +00:00
Rafael Espindola
7250573745
Remove Path::canWrite.
...
llvm-svn: 184235
2013-06-18 21:10:03 +00:00
Rafael Espindola
40fa7cd224
Add a can_write function to PathV2.
...
llvm-svn: 184233
2013-06-18 20:56:38 +00:00
Rafael Espindola
9c21fca143
Remove unused Path::canRead.
...
llvm-svn: 184229
2013-06-18 20:42:25 +00:00
Rafael Espindola
9cac309394
Remove uniqueID from PathV1.h.
...
llvm-svn: 184219
2013-06-18 19:46:19 +00:00
Rafael Espindola
c014b80c02
Add a GetUniqueID that will replace the uniqueID of PathV1.h.
...
llvm-svn: 184217
2013-06-18 19:34:49 +00:00
Rafael Espindola
18bf1abdc7
Add a version of unique_file that return just the file name.
...
llvm-svn: 184206
2013-06-18 17:01:00 +00:00
Alexey Samsonov
50c414e3d0
Basic support for parsing Mach-O universal binaries in LLVMObject library
...
llvm-svn: 184191
2013-06-18 15:03:28 +00:00
Rafael Espindola
344b614949
Reapply r183985 now that the missing check was added to PathV2.
...
llvm-svn: 184120
2013-06-17 20:37:56 +00:00
Rafael Espindola
81867d6723
Only delete regular files and directories.
...
This ports a missing feature from PathV1.h. I am not sure how to test this
with the regular infrastructure, but an Apple bot should check this when
r183985 is reapplied.
llvm-svn: 184119
2013-06-17 20:35:51 +00:00
Rafael Espindola
8a9592657a
Revert "Remove a use of PathV1.h."
...
This reverts commit r183985.
We were missing the checks for not deleting things like /dev/null.
llvm-svn: 184111
2013-06-17 19:54:17 +00:00
Rafael Espindola
2b411d1243
Don't use PathV1.h in LTOCodeGenerator.cpp
...
This patch also adds a simpler version of sys::fs::remove and a tool_output_file
constructor for when we already have an open file.
llvm-svn: 184095
2013-06-17 18:05:35 +00:00
Manuel Klimek
2a1720f206
Fix incorrectly finding 'executable' directories instead of files.
...
This broke for example the 'not' utility, if a directory called
'FileCheck' is executable and in the path before the actual 'FileCheck'.
This patch steals the implementation of the "old" PathV1 canExecute
implementation:
- checks for R_OK (file readable): this is necessary for executing
scripts; we should not regress here unless we have good reasons
- checks for S_ISREG; if we want to get rid of this, we'd need to
change all callers who already made the assumption when depending
on Path V1.
llvm-svn: 184074
2013-06-17 10:48:34 +00:00
Rafael Espindola
61f7e167f2
Add GetCurrentDirectory back.
...
It looks like clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp
depends on the behaviour of the old one on Windows. Maybe a difference
between GetCurrentDirectoryA and GetCurrentDirectoryW?
llvm-svn: 184009
2013-06-14 21:41:33 +00:00
Rafael Espindola
9534308a00
Replace use of PathV1.h in MCContext.cpp.
...
GetCurrentDirectory is now unused. Remove it.
llvm-svn: 184003
2013-06-14 20:26:58 +00:00
Rafael Espindola
109393c56d
Replace use of PathV1.h in Program.cpp.
...
llvm-svn: 183996
2013-06-14 19:38:45 +00:00
Rafael Espindola
9d4329e0fb
Remove unused argument.
...
llvm-svn: 183992
2013-06-14 18:12:13 +00:00
Rafael Espindola
9f0c1fe5ad
Don't use PathV1.h in GraphWriter.cpp.
...
llvm-svn: 183988
2013-06-14 17:11:14 +00:00
Rafael Espindola
4430795d30
Convert a use of sys::Path::GetTemporaryDirectory.
...
llvm-svn: 183987
2013-06-14 16:43:15 +00:00
Rafael Espindola
b3ffa88108
Remove a use of PathV1.h.
...
llvm-svn: 183985
2013-06-14 16:20:18 +00:00
Rafael Espindola
3e13459e12
Remove a use of PathV1.h.
...
llvm-svn: 183982
2013-06-14 15:24:56 +00:00
Rafael Espindola
703b03a992
Move PrependMainExecutablePath next to its only user.
...
llvm-svn: 183980
2013-06-14 15:12:13 +00:00
Rafael Espindola
7a9e435747
Remove a use of sys::Path.
...
llvm-svn: 183979
2013-06-14 13:59:21 +00:00
Rafael Espindola
0c66a19e9a
Try to fix the windows build.
...
llvm-svn: 183950
2013-06-13 21:38:21 +00:00
Rafael Espindola
6c0ca078e2
Don't use PathV1.h in Signals.h.
...
llvm-svn: 183947
2013-06-13 21:16:58 +00:00
Rafael Espindola
1cc376fe6a
Don't use PathV1.h in FileUtilities.h.
...
llvm-svn: 183941
2013-06-13 20:41:00 +00:00
Rafael Espindola
ef0d0d8b0b
Avoid using PathV1.h in Program.h.
...
llvm-svn: 183940
2013-06-13 20:25:38 +00:00
Rafael Espindola
eed3b256ab
Add a version of sys::ExecuteAndWait that takes StringRefs.
...
llvm-svn: 183934
2013-06-13 20:06:28 +00:00
Rafael Espindola
332b3ad6f7
Have sys::FindProgramByName return a std::string.
...
llvm-svn: 183928
2013-06-13 19:25:37 +00:00
Rafael Espindola
c368ef5dc8
Covert remaining graph viewers from sys::Path to std::string.
...
llvm-svn: 183921
2013-06-13 17:32:16 +00:00
Rafael Espindola
e2fee850e5
Update code for other graph viewing programs too.
...
llvm-svn: 183920
2013-06-13 17:27:45 +00:00
Rafael Espindola
df08289cf9
Reduce usage of sys::Path in the graph writer.
...
Now PathV1.h is not needed in GraphWriter.h.
llvm-svn: 183919
2013-06-13 17:20:48 +00:00
Reid Kleckner
bfcb8beaad
[Support] Fix handle and memory leak for processes that are not waited for
...
Execute's Data parameter is now optional, so we won't allocate memory
for it on Windows and we'll close the process handle.
The Unix code should probably do something similar to avoid accumulation
of zombie children that haven't been waited on.
Tested on Linux and Windows.
llvm-svn: 183906
2013-06-13 15:27:17 +00:00