| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
This reverts commit r253511.
This likely broke the bots in
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202
http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787
llvm-svn: 253543
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note, this was reviewed (and more details are in) http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html
These intrinsics currently have an explicit alignment argument which is
required to be a constant integer. It represents the alignment of the
source and dest, and so must be the minimum of those.
This change allows source and dest to each have their own alignments
by using the alignment attribute on their arguments. The alignment
argument itself is removed.
There are a few places in the code for which the code needs to be
checked by an expert as to whether using only src/dest alignment is
safe. For those places, they currently take the minimum of src/dest
alignments which matches the current behaviour.
For example, code which used to read:
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 500, i32 8, i1 false)
will now read:
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %dest, i8* align 8 %src, i32 500, i1 false)
For out of tree owners, I was able to strip alignment from calls using sed by replacing:
(call.*llvm\.memset.*)i32\ [0-9]*\,\ i1 false\)
with:
$1i1 false)
and similarly for memmove and memcpy.
I then added back in alignment to test cases which needed it.
A similar commit will be made to clang which actually has many differences in alignment as now
IRBuilder can generate different source/dest alignments on calls.
In IRBuilder itself, a new argument was added. Instead of calling:
CreateMemCpy(Dst, Src, getInt64(Size), DstAlign, /* isVolatile */ false)
you now call
CreateMemCpy(Dst, Src, getInt64(Size), DstAlign, SrcAlign, /* isVolatile */ false)
There is a temporary class (IntegerAlignment) which takes the source alignment and rejects
implicit conversion from bool. This is to prevent isVolatile here from passing its default
parameter to the source alignment.
Note, changes in future can now be made to codegen. I didn't change anything here, but this
change should enable better memcpy code sequences.
Reviewed by Hal Finkel.
llvm-svn: 253511
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: silvas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14444
llvm-svn: 253052
|
|
|
|
| |
llvm-svn: 251290
|
|
|
|
|
|
|
|
| |
Also adds a 'trivial' ELF file. This was generated by assembling
and linking a file with the symbol main which contains a single
return instruction.
llvm-svn: 251096
|
|
|
|
| |
llvm-svn: 249043
|
|
|
|
|
|
| |
Patch by Igor Kudrin!
llvm-svn: 248194
|
|
|
|
| |
llvm-svn: 248097
|
|
|
|
| |
llvm-svn: 248096
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
global aliases
update.py:
import fileinput
import sys
import re
alias_match_prefix = r"(.*(?:=|:|^)\s*(?:external |)(?:(?:private|internal|linkonce|linkonce_odr|weak|weak_odr|common|appending|extern_weak|available_externally) )?(?:default |hidden |protected )?(?:dllimport |dllexport )?(?:unnamed_addr |)(?:thread_local(?:\([a-z]*\))? )?alias"
plain = re.compile(alias_match_prefix + r" (.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|addrspacecast|\[\[[a-zA-Z]|\{\{).*$)")
cast = re.compile(alias_match_prefix + r") ((?:bitcast|inttoptr|addrspacecast)\s*\(.* to (.*?)(| addrspace\(\d+\) *)\*\)\s*(?:;.*)?$)")
gep = re.compile(alias_match_prefix + r") ((?:getelementptr)\s*(?:inbounds)?\s*\((?P<type>.*), (?P=type)(?:\s*addrspace\(\d+\)\s*)?\* .*\)\s*(?:;.*)?$)")
def conv(line):
m = re.match(cast, line)
if m:
return m.group(1) + " " + m.group(3) + ", " + m.group(2)
m = re.match(gep, line)
if m:
return m.group(1) + " " + m.group(3) + ", " + m.group(2)
m = re.match(plain, line)
if m:
return m.group(1) + ", " + m.group(2) + m.group(3) + "*" + m.group(4) + "\n"
return line
for line in sys.stdin:
sys.stdout.write(conv(line))
apply.sh:
for name in "$@"
do
python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name"
rm -f "$name.tmp"
done
The actual commands:
From llvm/src:
find test/ -name *.ll | xargs ./apply.sh
From llvm/src/tools/clang:
find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}"
From llvm/src/tools/polly:
find test/ -name *.ll | xargs ./apply.sh
llvm-svn: 247378
|
|
|
|
|
|
|
| |
If a symbol is marked as "data", the symbol should be exported
with __imp_ prefix. Previously, the symbol was exported as-is.
llvm-svn: 246532
|
|
|
|
|
|
|
|
|
|
|
| |
short import files
This patch includes a fix for a llvm-readobj test. With this patch,
the tool does no longer print out COFF headers for the short import
file, but that's probably desirable because the header for the short
import file is dummy.
llvm-svn: 246283
|
|
|
|
|
|
|
|
| |
short import files
This change caused a test for llvm-readobj to fail.
llvm-svn: 246277
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
COFF short import files are special kind of files that contains only
DLL-exported symbol names. That's different from object files because
it has no data except symbol names.
This change implements a SymbolicFile interface for the short import
files so that symbol names can be accessed through that interface.
llvm-ar is now able to read the file and create symbol table entries
for short import files.
llvm-svn: 246276
|
|
|
|
| |
llvm-svn: 245873
|
|
|
|
|
|
| |
It was already passing, we were just not testing the code.
llvm-svn: 244504
|
|
|
|
| |
llvm-svn: 244323
|
|
|
|
|
|
|
|
|
| |
In tree they are only used by llvm-readobj, but it is also used by
https://github.com/mono/CppSharp.
While at it, add some missing error checking.
llvm-svn: 244320
|
|
|
|
|
|
|
|
|
|
| |
lld might end up using a small part of this, but it will be in a much
refactored form. For now this unblocks avoiding the full section scan in the
ELFFile constructor.
This also has a (very small) error handling improvement.
llvm-svn: 244282
|
|
|
|
| |
llvm-svn: 244259
|
|
|
|
|
|
|
|
| |
This makes llvm-nm consistent with binutils nm on executables and DLLs.
For a vanilla hello world executable, the address of main should include
the default image base of 0x400000.
llvm-svn: 243755
|
|
|
|
|
|
|
|
| |
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11263
llvm-svn: 243724
|
|
|
|
| |
llvm-svn: 242998
|
|
|
|
| |
llvm-svn: 242981
|
|
|
|
| |
llvm-svn: 242949
|
|
|
|
|
|
| |
We were trying to read it as an external file.
llvm-svn: 242926
|
|
|
|
| |
llvm-svn: 242921
|
|
|
|
| |
llvm-svn: 242839
|
|
|
|
| |
llvm-svn: 242712
|
|
|
|
|
|
| |
Use just the pointers and check for invalid relocation sections.
llvm-svn: 242700
|
|
|
|
| |
llvm-svn: 242676
|
|
|
|
|
|
| |
We now use a simple pointer and have range loops.
llvm-svn: 242669
|
|
|
|
| |
llvm-svn: 242658
|
|
|
|
| |
llvm-svn: 242657
|
|
|
|
|
|
|
|
|
| |
llvm-readobj exists for testing llvm. We can safely stop the program
the first time we know the input in corrupted.
This is in preparation for making it handle a few more broken files.
llvm-svn: 242656
|
|
|
|
| |
llvm-svn: 242367
|
|
|
|
|
|
| |
The member has to end up with a path relative to the archive.
llvm-svn: 242362
|
|
|
|
|
|
|
| |
We were already doing the right thing for short file names, but not long
ones.
llvm-svn: 242354
|
|
|
|
|
|
| |
While at it, test that we can add to a thin archive.
llvm-svn: 242330
|
|
|
|
| |
llvm-svn: 242269
|
|
|
|
| |
llvm-svn: 242236
|
|
|
|
|
|
|
|
|
|
| |
For now the Archive owns the buffers of the thin archive members.
This makes for a simple API, but all the buffers are destructed
only when the archive is destructed. This should be fine since we
close the files after mmap so we should not hit an open file
limit.
llvm-svn: 242215
|
|
|
|
|
|
| |
This matches the gnu ar behavior.
llvm-svn: 242162
|
|
|
|
|
|
| |
Might fix pr24106.
llvm-svn: 242158
|
|
|
|
| |
llvm-svn: 242156
|
|
|
|
| |
llvm-svn: 242151
|
|
|
|
|
|
| |
Sorry about that.
llvm-svn: 242083
|
|
|
|
|
|
| |
This is important for thin archives.
llvm-svn: 242082
|
|
|
|
| |
llvm-svn: 242061
|
|
|
|
| |
llvm-svn: 241937
|