Page MenuHomePhabricator

arichardson (Alexander Richardson)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 4 2015, 4:18 PM (198 w, 4 d)

Recent Activity

Thu, Jun 20

arichardson added inline comments to D60389: FileCheck [9/12]: Add support for matching formats.
Thu, Jun 20, 3:13 AM · Restricted Project
arichardson added inline comments to D60388: FileCheck [8/12]: Define numeric var from expr.
Thu, Jun 20, 2:59 AM · Restricted Project

Wed, Jun 12

arichardson added a comment to D31924: SROA: Allow eliminating addrspacecasted allocas.

I think this looks like it will improve codegen for us and not violate any of our C-level guarantees. Hopefully @arichardson can also take a look.

Wed, Jun 12, 1:45 AM

Tue, Jun 11

arichardson added inline comments to D60387: FileCheck [7/12]: Arbitrary long numeric expressions.
Tue, Jun 11, 4:24 AM · Restricted Project
arichardson added a comment to D63125: FileCheck: Return parse error w/ Error & Expected.

Looks good to me. Just two minor comments:

Tue, Jun 11, 4:10 AM · Restricted Project
arichardson added a comment to D63121: [ELF] Make the rule to create relative relocations in a writable section stricter.

This looks good to me. However, I think the name SymbolicRel does not make it immediately obvious to me it should be used for. Maybe add a comment to the member?

Tue, Jun 11, 1:15 AM · Restricted Project

May 22 2019

arichardson added a comment to D42748: [ELF] Don't create a .dynamic section when linking with -Bstatic.
In D42748#1511604, @kib wrote:

From the description

This also causes a .dynamic section, the _DYNAMIC symtbol and a PT_DYNAMIC header to be added to the output file. This causes problems for example when trying to run such a binary on FreeBSD MIPS.

What I know is just that the presence of _DYNAMIC caused a problem but I don't have more information why it caused the problem. Without more information I can only conjecture. My intuition says it is more likely a problem if the dynamic is absent in some scenarios, I don't understand how the presence (though probably unexpected by you) caused a problem.

The C Runtime (cumulative of crt1.o and libc.so/libc.a) contains a lot of code like if (&_DYNAMIC != NULL) used as a test for the static/dynamic situation. Look at the https://github.com/freebsd/freebsd/blob/master/lib/csu/amd64/crt1.c#L62, there are many more. I believe it was mentioned many times in the discussion.

Perhaps first you should define what features of static binaries you depend on. In fact PT_INTERP is not absolutely needed to have any of the dynamic feature, in principle rtld.c can be linked from crt1.o. And if we (FreeBSD) decide to support dlopen(3) from static binaries, this is what would happen. We already got a small dynamic linker in crt1.o to support ifunc relocations.

Absence of the DYNAMIC segment is rather good indication that a lot of dynamic features are indeed not used, so &_DYNAMIC == 0 is probably quite good check except that it is broken.

@kib So to answer your question, I need more information.

And if we (FreeBSD) decide to support dlopen(3) from static binaries

And if you decide to support static pie, you also need _DYNAMIC.

Are you sure about this ? For static PIE, as I understand, we miss some kind of relocator in csu. For the relocator to work, all we need is to find the relocation section' boundaries. See for instance https://github.com/freebsd/freebsd/blob/master/lib/csu/common/ignore_init.c#L52 how we find iplt relocations in static binaries. I would expect that a similar approach works for non-iplt.

May 22 2019, 2:52 AM · Restricted Project
arichardson added a comment to D42748: [ELF] Don't create a .dynamic section when linking with -Bstatic.

@arichardson
If the MIPS problem was similar to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236165 ,
moving away from &_DYNAMIC will be a more reliable approach.
To check if an executable is dynamically linked, inspecting PT_INTERP is a better choice.

Checking if a weak undefined symbol has zero address is unreliale.
Some compilers may produce a GOT-generating relocation, some may produce an absolute relocation.
After linking, you may see the relocation resolved to static 0, or see a dynamic relocation (if at runtime there is some module providing the dynamic symbol, the weak reference will resolve to non-zero)

Quoting http://www.sco.com/developers/gabi/latest/ch4.symtab.html

The behavior of weak symbols in areas not specified by this document is implementation defined. Weak symbols are intended primarily for use in system software. Applications using weak symbols are unreliable since changes in the runtime environment might cause the execution to fail.

May 22 2019, 2:36 AM · Restricted Project

May 9 2019

arichardson added a comment to D61710: lld: Add a warning limit, similar to the existing error limit.

I implemented the same thing for the CHERI fork of lld since I added some new warning that could in certain cases be emitted many times but are not necessarily a real problem.

What would you do if something is not a real problem? I'd think "fix all warning" is generally a good idea, so I'd try to fix the problem (if it is not a real problem) or suppress the warning, and when suppressing a warning, I'd do one by one. So I wouldn't personally suppress warnings as a whole, as it could hide other warnings.

May 9 2019, 1:35 AM · Restricted Project
arichardson added a comment to D61710: lld: Add a warning limit, similar to the existing error limit.

I implemented the same thing for the CHERI fork of lld since I added some new warning that could in certain cases be emitted many times but are not necessarily a real problem.

May 9 2019, 12:46 AM · Restricted Project

May 8 2019

arichardson added a reviewer for D49942: [ASAN] Port asan to FreeBSD/mips64.: Restricted Project.
May 8 2019, 10:48 AM · Restricted Project, Restricted Project

May 2 2019

arichardson added inline comments to D60385: FileCheck [5/12]: Introduce regular numeric variables.
May 2 2019, 2:39 AM · Restricted Project

Apr 24 2019

arichardson added a comment to D59725: Additions to creduce script.

I've stumbled into an issue with the script:
It got a line: clang: /build/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2582: bool {anonymous}::IndVarSimplify::run(llvm::Loop*): Assertion L->isRecursivelyLCSSAForm(*DT, *LI) && "LCSSA required to run indvars!"' failed.`
And produced the following grep: grep 'L->isRecursivelyLCSSAForm(*DT, *LI) && "LCSSA required to run indvars!"' t.log || exit 1
But that doesn't work, escapes should be applied. it should be
grep 'L->isRecursivelyLCSSAForm(\*DT, \*LI) && \"LCSSA required to run indvars!\"' t.log || exit 1

Apr 24 2019, 11:46 AM · Restricted Project, Restricted Project

Apr 16 2019

arichardson added inline comments to D60383: FileCheck [3/12]: Stricter parsing of @LINE expressions.
Apr 16 2019, 7:27 AM · Restricted Project
arichardson accepted D60773: [llvm-objcopy] Support full list of bfd targets that lld uses..

Thanks for fixing this! LGTM

Apr 16 2019, 7:23 AM · Restricted Project

Apr 11 2019

arichardson added a comment to D60555: [llvm-objcopy] Fill .symtab_shndx section correctly.

Test case?

Have you seen bug description?
The problem with test case is that it requires file with large number of sections of which at least some should have relocation sections.
I have 19Mb object file generated by clang, but I'm not sure if using it as test case is a good idea ...

Sorry, I skipped over that somehow (I think I jumped straight from the bug). We already have at least one test that uses many sections (see many-sections.test). That unzips a pre-built object to achieve this. One option might be to update that object file (and possibly the test), if it can satisfy the prerequisites you need.

Apr 11 2019, 3:05 AM · Restricted Project

Mar 29 2019

arichardson accepted D59725: Additions to creduce script.

LGTM once the tempfile is deleted.

Mar 29 2019, 2:51 AM · Restricted Project, Restricted Project

Mar 28 2019

arichardson added a comment to D59725: Additions to creduce script.

Only a few more nits on my side, and this LGTM. WDYT, arichardson?

Mar 28 2019, 3:13 AM · Restricted Project, Restricted Project

Mar 26 2019

arichardson added inline comments to D59725: Additions to creduce script.
Mar 26 2019, 2:26 AM · Restricted Project, Restricted Project

Mar 21 2019

arichardson added a comment to D57940: Refactor RelocVisitor and fix computation of SHT_RELA-typed relocation entries.

dispatch using Config->IsRela

The value of getAddend<ELFT>(Rel); now only seems to be in Ref.getRawDataRefImpl().p now. Shouldn't the rel case also be adding the implicit addend? I'm not sure I'm reading the code currently but it looks to me like REL no longer gets the addend added.

Mar 21 2019, 5:25 PM · Restricted Project
arichardson added a comment to D59440: add steps to preprocess file and reduce command line args.

@akhuang Thanks for getting this committed. Since it seems like a lot of this is taken from my script, could you please add me as a reviewer for the next patch so that I know which bits still need to be upstreamed?

Mar 21 2019, 2:17 AM · Restricted Project

Mar 16 2019

arichardson added inline comments to D59275: [ELF] Emit weak-undef symbols in .dynsym of a PIE only if linked against shared libs..
Mar 16 2019, 4:45 AM · Restricted Project

Mar 12 2019

arichardson added a comment to D59118: creduce script for clang crashes.

In case anyone is interested, for the CHERI fork of LLVM/Clang I added a similar script that contains additional features such as inferring the crash message (so that you get the minimal reproducer for the issue that you are trying to reduce and not some obscure parser crash for invalid input), dealing with infinite loops, generating a test case with a mostly sensible RUN: line.
Furthermore, it will attempt to use bugpoint if it is a backend rather than a frontend crash since that is much much faster than creduce.
It should allows you to run $LLVM_BUILDIR/bin/creduce_crash_testcase.py /tmp/clang-reproducers.sh and then give a sensible minimal test case back

Mar 12 2019, 12:06 PM · Restricted Project

Feb 28 2019

arichardson accepted D58745: [CMake][libunwind] Define add_target_flags which is missing.

LGTM

Feb 28 2019, 12:43 AM · Restricted Project

Feb 21 2019

arichardson added a comment to D57670: [CMake] Support CMake variables for setting target, sysroot and toolchain.

I believe this broke building libunwind standalone for me since it complains about add_target_flags() not being defined. I guess it also needs to be copied to the libunwind cmake files?

Feb 21 2019, 10:46 AM · Restricted Project

Jan 19 2019

arichardson added a comment to D56940: FileOutputBuffer: Treat "-" as the stdout..

This looks good to me.

Jan 19 2019, 2:29 AM

Jan 14 2019

arichardson added a comment to D56598: Add llvm.psub.

I like the introduction of a explicit pointer subtraction since ptrtoint/inttoptr can cause lots of subtle bugs in our CHERI backend. However, I wonder if this should be an instruction instead of an intrinsic?

Jan 14 2019, 10:28 AM
arichardson added a comment to D56650: [lld] [ELF] Support customizing behavior on target triple.

I'm happy with this approach since the triple can be set on the commandline.
If this gets merged I will update CHERI lld to use the triple instead of the new emulation that we added.

Jan 14 2019, 5:42 AM

Jan 11 2019

arichardson requested changes to D56215: [lld] [ELF] Include default search paths for NetBSD driver.
Jan 11 2019, 9:36 AM · lld

Jan 8 2019

arichardson added inline comments to D56215: [lld] [ELF] Include default search paths for NetBSD driver.
Jan 8 2019, 2:58 PM · lld

Jan 7 2019

arichardson added a comment to D55212: Handle alloc_size attribute on function pointers.

I don't see an easy way of fixing the pragma clang attribute support for this.
Would it be okay to commit this change anyway?
Since alloc_size is only used for very few functions I'd be very surprised if there's any existing code that relies on using #pragma clang atrribute with alloc_size.

Jan 7 2019, 3:47 AM

Jan 4 2019

arichardson added a comment to D56215: [lld] [ELF] Include default search paths for NetBSD driver.

For the record, another option is to actually fix other software not to call LD directly.

Or if you really need to call the linker directly without specifying search paths you could also install a shell script as /usr/bin/ld that passes the appropriate flags to /usr/bin/ld.lld?

Jan 4 2019, 6:48 AM · lld

Dec 20 2018

arichardson added a comment to D49084: FileCheck: Add support for numeric variables and expressions.

Thanks for updating this patch. It will be very useful!

Dec 20 2018, 4:35 PM · Restricted Project

Dec 19 2018

arichardson accepted D55886: [llvm-objcopy] - Do not drop the OS/ABI and ABIVersion fields of ELF header.

LGTM. I recently tried to use llvm-objcopy for building CheriBSD (a fork of FreeBSD for the CHERI CPU) and ran into asserts due to missing ELFOSABI_FREEBSD.

Dec 19 2018, 4:54 PM

Dec 13 2018

arichardson added inline comments to D55483: Introduce the callback attribute and emit !callback metadata.
Dec 13 2018, 1:35 AM

Dec 12 2018

arichardson added a comment to D42790: [ELF] Check that Elf_Rela addends are always written with -r.

Is this patch still needs to be applied?

Dec 12 2018, 10:03 AM

Dec 10 2018

arichardson added inline comments to D55212: Handle alloc_size attribute on function pointers.
Dec 10 2018, 12:04 PM
arichardson added a reviewer for D55212: Handle alloc_size attribute on function pointers: arphaman.
Dec 10 2018, 12:04 PM
arichardson added inline comments to D55212: Handle alloc_size attribute on function pointers.
Dec 10 2018, 8:29 AM
arichardson updated the diff for D55212: Handle alloc_size attribute on function pointers.

fix typo

Dec 10 2018, 8:28 AM
arichardson updated the diff for D55212: Handle alloc_size attribute on function pointers.

clang-format
fix a failing test

Dec 10 2018, 8:27 AM

Dec 6 2018

arichardson updated the diff for D55212: Handle alloc_size attribute on function pointers.

Add a C++ test for alloc_size

Dec 6 2018, 12:46 PM
arichardson added inline comments to D55212: Handle alloc_size attribute on function pointers.
Dec 6 2018, 5:23 AM

Dec 3 2018

arichardson added a comment to D55212: Handle alloc_size attribute on function pointers.

Thanks for the review! I'll write a C++ test tomorrow.

Dec 3 2018, 12:23 PM
arichardson updated the diff for D55212: Handle alloc_size attribute on function pointers.
  • address review comments
  • add test that we can assign between function pointers with and without alloc_size attribute.
Dec 3 2018, 8:07 AM
arichardson added inline comments to D55212: Handle alloc_size attribute on function pointers.
Dec 3 2018, 8:02 AM
arichardson updated the diff for D55212: Handle alloc_size attribute on function pointers.

Remove RUN: line added for debugging

Dec 3 2018, 4:51 AM
arichardson created D55212: Handle alloc_size attribute on function pointers.
Dec 3 2018, 4:49 AM

Nov 28 2018

arichardson created D55001: [CMake] Fix build with -DLLVM_TOOL_LLVM_{MCA/EXEGESIS}_BUILD=OFF.
Nov 28 2018, 6:12 AM

Nov 14 2018

arichardson committed rCXX346878: [libcxx] [test] Fix running tests on macOS with python3.
[libcxx] [test] Fix running tests on macOS with python3
Nov 14 2018, 10:02 AM
arichardson committed rL346878: [libcxx] [test] Fix running tests on macOS with python3.
[libcxx] [test] Fix running tests on macOS with python3
Nov 14 2018, 10:01 AM
arichardson closed D54522: Fix running tests on macOS with python3.
Nov 14 2018, 10:01 AM
arichardson updated the diff for D54522: Fix running tests on macOS with python3.

remove debug message

Nov 14 2018, 4:50 AM
arichardson added inline comments to D54522: Fix running tests on macOS with python3.
Nov 14 2018, 4:49 AM
arichardson created D54522: Fix running tests on macOS with python3.
Nov 14 2018, 4:48 AM

Nov 13 2018

arichardson abandoned D38167: [ELF] Ensure that .init/.fini sections are padded with nops instead of traps.

LLD should not attempt to workaround bugs in crt*.o files

Nov 13 2018, 3:03 AM · lld
arichardson updated the diff for D40016: Use ImplicitConversionSequence::setAsIdentityConversion(QualType). NFC.

rebased on latest HEAD

Nov 13 2018, 3:01 AM
arichardson committed rL346751: Fix .cfi_restore with register numbers > 64.
Fix .cfi_restore with register numbers > 64
Nov 13 2018, 2:57 AM
arichardson closed D54420: Fix .cfi_restore with register numbers > 64.
Nov 13 2018, 2:57 AM
arichardson committed rL346750: Fix modules build of AVRAsmParser.cpp.
Fix modules build of AVRAsmParser.cpp
Nov 13 2018, 2:57 AM
arichardson closed D53425: Fix modules build of AVRAsmParser.cpp.
Nov 13 2018, 2:57 AM

Nov 12 2018

arichardson added a comment to D54424: [DWARF] Do not use PRIx32 for printing uint64_t values.

Any chance of a test case?

I hope the following test case starts to pass on mips buildbot:
http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/3739/steps/test-llvm/logs/FAIL%3A%20LLVM%3A%3Adebug_addr.ll

Could this also be tested cross-platform (on any platform that's building the mips backend)? (ie: a version of this test that 'REQUIRES: ' the mips target and specifically targets it)

I cannot figure out how to do that. In fact we test various libc. The following code (compiled by gcc and clang) works fine on x86_64 in both 32/64-bit executables but shows incorrect output on mips 32-bit.

uint64_t V = 1;
printf("0x%8.8" PRIx32 "\n", V);

Nov 12 2018, 1:01 PM
arichardson created D54420: Fix .cfi_restore with register numbers > 64.
Nov 12 2018, 3:29 AM
arichardson added a comment to rL346520: Use the correct address space when emitting the ctor function list.

We have also made quite a few of these changes in https://github.com/CTSRD-CHERI/clang.
We place both functions and globals in AS200 (eventually I would like to move functions to a separate AS but that's quite difficult right now) so we get lots of errors due to implicit address space 0.
In fact I made changes to completely remove all uses of PointerType::getUnqual() in clang and most of them in LLVM. I might make sense for you to have a look at our changes too. I would like to upstream all of these changes but I am currently too busy to clean up the patches. Since program and alloca AS are identical for us there might be some cases where we use them interchangeably.

Nov 12 2018, 1:50 AM

Nov 7 2018

arichardson added a comment to D54200: [PPC64] Use INT32_MIN instead of std::numeric_limits<int32_t>::min().

I agree with James that numeric_limits is clearer. I've run into bugs before because there was a 0/f missing when trying to use max/min value integers.

Nov 7 2018, 3:51 AM

Nov 1 2018

arichardson added a comment to D53425: Fix modules build of AVRAsmParser.cpp.

ping?

Nov 1 2018, 4:41 AM

Oct 23 2018

arichardson accepted D53566: Fix warning: extra ‘;’ [-Wpedantic].

Ah yes looks like I made a copy paste error when changing the lambda to a function and it compiled fine for me so I didn't notice.

Oct 23 2018, 11:07 AM

Oct 20 2018

arichardson committed rLLD344842: Add an addAbsolute static function to Writer.cpp.
Add an addAbsolute static function to Writer.cpp
Oct 20 2018, 4:17 AM
arichardson committed rL344842: Add an addAbsolute static function to Writer.cpp.
Add an addAbsolute static function to Writer.cpp
Oct 20 2018, 4:15 AM
arichardson closed D53393: Add a addAbsolute static function to Writer.cpp.
Oct 20 2018, 4:14 AM

Oct 19 2018

arichardson added a comment to D53393: Add a addAbsolute static function to Writer.cpp.

Thank you very much for the detailed explanation.

Oct 19 2018, 2:39 AM
arichardson created D53425: Fix modules build of AVRAsmParser.cpp.
Oct 19 2018, 2:33 AM

Oct 18 2018

arichardson added a comment to rL344305: Remove SymbolTable::addAbsolute()..

Yes, this is totally fine. I do not expect any kind of API stability and I think removing code that is not used is a good thing.
I have submitted D53393 as a possible solution that in my opinion increases readability and allows reducing differences to upstream.
If you don't think my patch is acceptable I can also revert this commit in our fork but I would very much like to keep our diff as small as possible to make it easier to upstream any changes.

Oct 18 2018, 6:41 AM
arichardson created D53393: Add a addAbsolute static function to Writer.cpp.
Oct 18 2018, 6:04 AM
arichardson added a comment to rL344305: Remove SymbolTable::addAbsolute()..

We were using addAbsolute() outside of this function in our CHERI fork. I can certainly change those uses to Symtab->addDefined(Name, STV_HIDDEN, STT_NOTYPE, 0, 0, STB_GLOBAL, nullptr, nullptr) but I find the addAbsolute() makes the code more easy to understand.
I also find that this change makes addReservedSymbols() less readable.

Oct 18 2018, 5:56 AM

Sep 7 2018

arichardson added inline comments to D50560: [LLD] Enable Visual Studio compatible diagnostics..
Sep 7 2018, 6:29 AM · Restricted Project, lld

Aug 23 2018

arichardson committed rC340522: Update avr attributes test for output change in r340519.
Update avr attributes test for output change in r340519
Aug 23 2018, 3:22 AM
arichardson committed rL340522: Update avr attributes test for output change in r340519.
Update avr attributes test for output change in r340519
Aug 23 2018, 3:22 AM
arichardson committed rL340519: Allow creating llvm::Function in non-zero address spaces.
Allow creating llvm::Function in non-zero address spaces
Aug 23 2018, 2:26 AM
arichardson closed D47541: Allow creating llvm::Function in non-zero address spaces.
Aug 23 2018, 2:26 AM

Jul 24 2018

arichardson updated the diff for D47541: Allow creating llvm::Function in non-zero address spaces.

Add parseOptionalProgrammAddrSpace() as suggested
Update tests

Jul 24 2018, 7:56 AM
arichardson committed rL337824: Stop wrapping __has_include in another macro.
Stop wrapping __has_include in another macro
Jul 24 2018, 5:41 AM
arichardson committed rCXX337824: Stop wrapping __has_include in another macro.
Stop wrapping __has_include in another macro
Jul 24 2018, 5:41 AM
arichardson closed D49067: Stop wrapping __has_include in another macro.
Jul 24 2018, 5:41 AM
arichardson closed D49067: Stop wrapping __has_include in another macro.
Jul 24 2018, 5:41 AM

Jul 23 2018

arichardson added a comment to D49067: Stop wrapping __has_include in another macro.

Where are the special lexing rules specified?

Jul 23 2018, 3:37 PM
arichardson added a comment to D49091: Warn about usage of __has_include/__has_include_next in macro expansions.

Ping?

Jul 23 2018, 3:05 PM
arichardson added a comment to D49067: Stop wrapping __has_include in another macro.

Ping?

Jul 23 2018, 3:03 PM

Jul 13 2018

arichardson added a comment to D49084: FileCheck: Add support for numeric variables and expressions.

I case people are interested I have also implemented something similar in our fork of llvm. I chose [[@EXPR var + 0x42]] as the syntax. I also added some functions such as [[@EXPR hex(VAR)]].
Variables can either by referenced by name or if they conflict with one of the builtin functions using ${x} syntax: [[@EXPR toupper(hex(${hex}))]]

Simple functions are also on my wish-list! The main ones we care about are converting to and from hex numbers, and being able to do additions and subtractions. But I think just the basic integer and hex reading and additions would be a good start.

Jul 13 2018, 2:06 AM · Restricted Project

Jul 12 2018

arichardson added a comment to D47541: Allow creating llvm::Function in non-zero address spaces.

This seems to work quite nice for me now! Nice!

I added a few inline nit comments. Apart from that it looks good to me.
Although, I don't know much about the bitcode reader/writer. Anyone else who can help out reviewing that part?

PS. I still have a few worries about how well this plays together with instrprof, we have had some hacks in that area earlier. Methods like appendToGlobalArray (in ModuleUtils.cpp) still uses PointerType::getUnqual(FnTy) to strip off the addrspace from function pointers (and afaik the size of a pointer can be different in different adress spaces).
Although, I don't think we can solve all problems right away. This patch at least gives us the power to set addrspace on functions. And that should help out if I for example want to reproduce instrprof problems on trunk (using an "experimental target" with non-zero program addrspace). So I think we can leave that for later.

Jul 12 2018, 2:38 PM
arichardson added a comment to D49084: FileCheck: Add support for numeric variables and expressions.

I case people are interested I have also implemented something similar in our fork of llvm. I chose [[@EXPR var + 0x42]] as the syntax. I also added some functions such as [[@EXPR hex(VAR)]].
Variables can either by referenced by name or if they conflict with one of the builtin functions using ${x} syntax: [[@EXPR toupper(hex(${hex}))]]
Some examples of what it can do can be seen here: https://github.com/CTSRD-CHERI/llvm/blob/master/test/FileCheck/expressions.txt

Jul 12 2018, 2:33 PM · Restricted Project

Jul 9 2018

arichardson updated the diff for D47541: Allow creating llvm::Function in non-zero address spaces.

Remove unrelated change and don't use llvm.phx.aload()

Jul 9 2018, 11:15 AM
arichardson created D49091: Warn about usage of __has_include/__has_include_next in macro expansions.
Jul 9 2018, 10:53 AM
arichardson updated the diff for D47541: Allow creating llvm::Function in non-zero address spaces.

Chose option 3) to handle forward-declarations.
I tried updating the address space later but that caused lots of problems.
Instead the call/invoke instruction can now accept an optional addrspace(N)
qualifier to indicate the address space of the called function.

Jul 9 2018, 8:36 AM
arichardson created D49067: Stop wrapping __has_include in another macro.
Jul 9 2018, 4:10 AM
arichardson added a comment to D45383: Limit types of builtins that can be redeclared..

This broke the build of FreeBSD for me due to the declaration of __builtin_return_address(unsigned int) in https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Base.h#L1281:

Jul 9 2018, 1:53 AM · Restricted Project

Jul 8 2018

arichardson added inline comments to D47541: Allow creating llvm::Function in non-zero address spaces.
Jul 8 2018, 1:17 PM

Jul 4 2018

arichardson abandoned D41821: [MIPS] Disassemble the 0xefefefef trap padding used by LLD.
Jul 4 2018, 11:01 AM

Jul 2 2018

arichardson added a comment to D48803: Place the BlockAddress type in the program address space.

I don't know much about the BlockAddress concept. The LangRef says things like "always has an i8* type" and "this may be passed around as an opaque pointer sized value". But I guess it would be weird if the size doesn't match the size of pointers in the program address space, so the patch makes sense to me.

I assume that this can't be reproduced for any in-tree target?
If you can't find an in-tree reproducer, then maybe you can describe the problem a little bit more instead. Such as which assert you hit, and maybe a small stack trace. That might help when trying to motivate this patch in the future.

Yes I'm not sure I can make a test for this with any of the existing targets. I'll see if I can get something with AVR since that sets program address space to 1.

Jul 2 2018, 9:46 AM
arichardson added a comment to D47541: Allow creating llvm::Function in non-zero address spaces.

Ping? I've applied this to our fork and it has improved inlining and helps us avoid bugs due to using the wrong address space. I would very much like to have this upstream.

Jul 2 2018, 9:44 AM