arichardson (Alexander Richardson)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Wed, May 23

arichardson added a comment to D31287: [mips] Fix atomic compare and swap at O0, v3.

LGTM. Also looks like it should be easy to adjust our CHERI ll/sc instructions to use the same mechanism when I do the next upstream merge.

Wed, May 23, 1:28 AM
arichardson accepted D31528: [ELF][MIPS] Multi-GOT implementation.

As I have mentioned before, having this patch is the difference between LLD being completely unusable for our purposes (linking FreeBSD MIPS n64) and being able to replace BFD.

Wed, May 23, 1:22 AM · lld

Wed, May 16

arichardson committed rL332440: Escape ]]> in xunit xml output.
Escape ]]> in xunit xml output
Wed, May 16, 2:04 AM
arichardson closed D46886: Escape ]]> in xunit xml output.
Wed, May 16, 2:04 AM
arichardson committed rL332439: Emit a left-shift instead of a power-of-two multiply for jump-tables.
Emit a left-shift instead of a power-of-two multiply for jump-tables
Wed, May 16, 2:02 AM
arichardson closed D45760: Emit a left-shift instead of a power-of-two multiply for jump-tables.
Wed, May 16, 2:02 AM

Tue, May 15

arichardson added a comment to D46886: Escape ]]> in xunit xml output.

Is this an issue you are hitting? I noticed we spend a lot of time in string replace while writing the xunit files when the output is large (for instance if every test in the test suite fails). I was hoping the number of replaces we do could go down.

Besides that LGTM.

Tue, May 15, 10:04 AM
arichardson created D46886: Escape ]]> in xunit xml output.
Tue, May 15, 9:02 AM
arichardson updated the diff for D45760: Emit a left-shift instead of a power-of-two multiply for jump-tables.

Address review comment

Tue, May 15, 8:26 AM

Mon, May 7

arichardson accepted D24867: Request init/fini array on FreeBSD 12 and later.

I recently made this change for the CHERI clang fork and as far as I can tell everything works fine.

Mon, May 7, 2:57 PM

Apr 20 2018

arichardson updated the diff for D45760: Emit a left-shift instead of a power-of-two multiply for jump-tables.

Perform the optimization in LegalizeDAG instead. Turns out this also fixes MSP430

Apr 20 2018, 3:12 AM
arichardson abandoned D43475: [llvm-objcopy] Implement --only-keep-debug.

This approach is wrong and I currently don't have time to work on a correct solution.

Apr 20 2018, 1:05 AM

Apr 18 2018

arichardson created D45760: Emit a left-shift instead of a power-of-two multiply for jump-tables.
Apr 18 2018, 3:24 AM

Apr 13 2018

arichardson added a comment to D31528: [ELF][MIPS] Multi-GOT implementation.

Thank you very much for updating this patch! I will be merging from upstream LLVM soon and having this rebased makes the merging so much easier.

Apr 13 2018, 2:24 AM · lld

Apr 12 2018

arichardson added a comment to D45574: Add PPC64_GLINK dynamic tag.

LGTM other than adding a gap between MIPS tags and PPC tags

Apr 12 2018, 1:40 PM

Apr 11 2018

arichardson added inline comments to D45166: [ELF] - Introduce helper for iterating over linker commands..
Apr 11 2018, 3:29 AM

Apr 10 2018

arichardson added a comment to D44093: [BUILTINS] structure pretty printer.

Ok, I found the problem. In fact the size of long is 4 bytes on your machine, but 8 bytes on mine.
This makes this // CHECK: [[LOAD1:%[0-9]+]] = load i64, i64* [[RES1]], fail.
Do you know a smart way to do it without dealing with type sizes ?

Apr 10 2018, 2:49 PM
arichardson added a comment to D44093: [BUILTINS] structure pretty printer.

Ok, I found the problem. In fact the size of long is 4 bytes on your machine, but 8 bytes on mine.
This makes this // CHECK: [[LOAD1:%[0-9]+]] = load i64, i64* [[RES1]], fail.
Do you know a smart way to do it without dealing with type sizes ?

Apr 10 2018, 2:49 PM
arichardson accepted D44093: [BUILTINS] structure pretty printer.

So, for the moment, we are only handling basic types. That said, for the enum in C, we will print according to the type of the enum.
In the future versions, I really want to be able to print the name of the enum so that the output is more relevent.
Anyway, the rule I followed for the moment is : if I don't recognize the type, I print it as an address.

Apr 10 2018, 10:48 AM
arichardson accepted D45490: [ADT] - Add llvm::make_mapped_range.

Seems like at -O2 clang 5.0.0 can optimize away all the optional checks (https://godbolt.org/g/rbGYrN)

Apr 10 2018, 9:36 AM
arichardson abandoned D43952: [ELF][MIPS] Don't change every dynamic relocation into R_MIPS_REL32.

This is wrong

Apr 10 2018, 9:03 AM
arichardson added inline comments to D45490: [ADT] - Add llvm::make_mapped_range.
Apr 10 2018, 8:46 AM
arichardson added a comment to D44093: [BUILTINS] structure pretty printer.

I'm also often restricted to using printf for debugging so this looks really useful!

Apr 10 2018, 8:25 AM

Apr 6 2018

arichardson added inline comments to D37054: Require address space to be specified when creating functions (2/3).
Apr 6 2018, 6:42 AM

Apr 2 2018

arichardson added inline comments to D45166: [ELF] - Introduce helper for iterating over linker commands..
Apr 2 2018, 9:42 AM

Mar 27 2018

arichardson committed rL328616: [MIPS] Add static_assert that all Fixups are handled in getFixupKind.
[MIPS] Add static_assert that all Fixups are handled in getFixupKind
Mar 27 2018, 3:11 AM
arichardson closed D44895: [MIPS] Add static_assert that all Fixups are handled in getFixupKind.
Mar 27 2018, 3:11 AM

Mar 26 2018

arichardson created D44895: [MIPS] Add static_assert that all Fixups are handled in getFixupKind.
Mar 26 2018, 6:06 AM

Mar 21 2018

arichardson added inline comments to D44761: Fix PR36793.
Mar 21 2018, 4:26 PM
arichardson committed rL328099: Change DT_* value definitions to macros in a separate file.
Change DT_* value definitions to macros in a separate file
Mar 21 2018, 7:20 AM
arichardson closed D44558: Change DT_* value definitions to macros in a separate file.
Mar 21 2018, 7:20 AM

Mar 20 2018

arichardson added inline comments to D44558: Change DT_* value definitions to macros in a separate file.
Mar 20 2018, 3:00 AM
arichardson updated the diff for D44558: Change DT_* value definitions to macros in a separate file.

Address review comments

Mar 20 2018, 2:59 AM

Mar 17 2018

arichardson created D44604: Make stdarg.h compatible with FreeBSD.
Mar 17 2018, 4:57 PM
arichardson added inline comments to D44601: LLD: Avoid segfault with --emit-relocs.
Mar 17 2018, 3:41 PM · lld

Mar 16 2018

arichardson updated the diff for D44558: Change DT_* value definitions to macros in a separate file.

Use correct version of diff

Mar 16 2018, 6:50 AM
arichardson created D44558: Change DT_* value definitions to macros in a separate file.
Mar 16 2018, 5:49 AM

Mar 14 2018

arichardson committed rL327564: [UpdateTestChecks] Handle IR variables with a '-' in the name.
[UpdateTestChecks] Handle IR variables with a '-' in the name
Mar 14 2018, 1:34 PM
arichardson closed D44459: [UpdateTestChecks] Handle IR variables with a '-' in the name.
Mar 14 2018, 1:34 PM
arichardson added a comment to D44459: [UpdateTestChecks] Handle IR variables with a '-' in the name.

It is named update_cc_test_checks.py. But do you think update_cc1_test_checks.py is a better name?

I've fixed the typo in my commit message. I think either name is fine (or even update_clang_test_checks.py).

Mar 14 2018, 1:29 PM
arichardson added a comment to D28896: [FileCheck] Add directive for checking for blank lines.

I just ran into this problem writing a test case and for now I used the workaround by @probinson but having a CHECK-EMPTY directive would make it much cleaner.

Mar 14 2018, 7:52 AM
arichardson added inline comments to D44453: Update Error Message.
Mar 14 2018, 2:43 AM
arichardson created D44459: [UpdateTestChecks] Handle IR variables with a '-' in the name.
Mar 14 2018, 2:35 AM
arichardson accepted D44400: Fix LLVM IR check lines in utils/update_cc_test_checks.py.

Just tested it and it works perfectly for me.

Mar 14 2018, 2:21 AM

Mar 13 2018

arichardson accepted D44438: [ELF] - Convert overlapping-sections.s testcase to x86 and cleanup..

The reason that this is a MIPS test case is that I work on CHERI (which extends MIPS) and therefore most of the testcases I write are derived from MIPS input.

Mar 13 2018, 2:59 PM

Mar 2 2018

arichardson added a comment to D42712: [utils] Add utils/update_cc_test_checks.py.

No need to revert, I think it is fine to improve the script in follow-up revisions. Thanks again for working on this!

Mar 2 2018, 1:01 PM
arichardson added a comment to D42712: [utils] Add utils/update_cc_test_checks.py.

LGTM, I guess the CHECK-LABEL thing can be fixed later.

Mar 2 2018, 9:40 AM
arichardson added a comment to D37054: Require address space to be specified when creating functions (2/3).

LGTM but I guess someone else should approve

Mar 2 2018, 9:35 AM
arichardson planned changes to D43952: [ELF][MIPS] Don't change every dynamic relocation into R_MIPS_REL32.

Turns out we can't emit R_MIPS_64 absolute relocations that don't need the GOT since neither glibc nor FreeBSD handle a R_MIPS_64 dynamic relocations.

Mar 2 2018, 6:55 AM
arichardson requested changes to D42712: [utils] Add utils/update_cc_test_checks.py.

If I have the following:

// RUN: %clang_cc1 -emit-llvm -o - %s -O2 | FileCheck %s
Mar 2 2018, 2:52 AM

Mar 1 2018

arichardson added inline comments to D43952: [ELF][MIPS] Don't change every dynamic relocation into R_MIPS_REL32.
Mar 1 2018, 10:21 AM
arichardson added inline comments to D43952: [ELF][MIPS] Don't change every dynamic relocation into R_MIPS_REL32.
Mar 1 2018, 10:12 AM
arichardson added a comment to D43920: Set DF_TEXTREL instead of creating an empty DT_TEXTREL..

The FreeBSD rtld supports both so this LGTM. Emitting both is probably more compatible but I'm not sure it's required. What does ld.bfd do?

Mar 1 2018, 9:58 AM
arichardson updated the diff for D43952: [ELF][MIPS] Don't change every dynamic relocation into R_MIPS_REL32.

Added the correct version of the test

Mar 1 2018, 9:41 AM
arichardson created D43952: [ELF][MIPS] Don't change every dynamic relocation into R_MIPS_REL32.
Mar 1 2018, 9:37 AM

Feb 28 2018

arichardson added a comment to D42712: [utils] Add utils/update_cc_test_checks.py.

Thanks for working on this!

Feb 28 2018, 11:31 AM

Feb 27 2018

arichardson committed rL326257: [ELF] Add llvm-readelf to the lit tool substitutions.
[ELF] Add llvm-readelf to the lit tool substitutions
Feb 27 2018, 2:05 PM
arichardson committed rLLD326257: [ELF] Add llvm-readelf to the lit tool substitutions.
[ELF] Add llvm-readelf to the lit tool substitutions
Feb 27 2018, 2:05 PM
arichardson closed D43827: [ELF] Add llvm-readelf to the lit tool substitutions.
Feb 27 2018, 2:05 PM
arichardson created D43827: [ELF] Add llvm-readelf to the lit tool substitutions.
Feb 27 2018, 9:39 AM
arichardson added inline comments to D37054: Require address space to be specified when creating functions (2/3).
Feb 27 2018, 5:40 AM
arichardson committed rL326188: Make the LLParser accept call instructions of variables in the program AS.
Make the LLParser accept call instructions of variables in the program AS
Feb 27 2018, 3:19 AM
arichardson closed D43645: Make the LLParser accept call instructions of variables in the program AS.
Feb 27 2018, 3:19 AM
arichardson committed rL326187: Don't output bitcode to stdout in 2002-07-31-SlashInString.ll test.
Don't output bitcode to stdout in 2002-07-31-SlashInString.ll test
Feb 27 2018, 3:19 AM

Feb 26 2018

arichardson added a comment to D37054: Require address space to be specified when creating functions (2/3).

Thanks for working on this, it will make life a lot easier for us when it lands.

Feb 26 2018, 4:49 AM

Feb 23 2018

arichardson committed rCXX325914: Allow passing additional compiler/linker flags for the tests.
Allow passing additional compiler/linker flags for the tests
Feb 23 2018, 7:25 AM
arichardson committed rL325914: Allow passing additional compiler/linker flags for the tests.
Allow passing additional compiler/linker flags for the tests
Feb 23 2018, 7:25 AM
arichardson closed D42139: Allow passing additional compiler/linker flags for the tests.
Feb 23 2018, 7:24 AM
arichardson added a comment to D43347: [ELF][MIPS] Support linking of PIE for MIPS.

I can verify that without this patch pie executables crash inside the FreeBSD (CheriBSD) RTLD when processing DT_MIPS_RLD_MAP and with it they work.

Feb 23 2018, 5:09 AM · lld

Feb 22 2018

arichardson added a comment to D37054: Require address space to be specified when creating functions (2/3).

@bjope does D43645 fix the LLParser issues for you?

Feb 22 2018, 2:51 PM
arichardson created D43645: Make the LLParser accept call instructions of variables in the program AS.
Feb 22 2018, 2:49 PM

Feb 20 2018

arichardson added a comment to D43475: [llvm-objcopy] Implement --only-keep-debug.

It seems like changing all alloc sections to NOBITS is probably the correct way of doing this. So I guess D40523 adjusted to always keep the named debug sections is better.
I don't think any of them are SHF_ALLOC anyway but checking the names shouldn't do any harm.

Feb 20 2018, 2:46 AM
arichardson added a comment to D37054: Require address space to be specified when creating functions (2/3).

Looks good once the IR parser accepts calls to non-AS0 pointers.

Feb 20 2018, 2:22 AM

Feb 19 2018

arichardson committed rL325528: [llvm-objcopy] Use the full filename in --add-gnu-debuglink.
[llvm-objcopy] Use the full filename in --add-gnu-debuglink
Feb 19 2018, 11:55 AM
arichardson closed D43474: [llvm-objcopy] Use the full filename in --add-gnu-debuglink.
Feb 19 2018, 11:55 AM
arichardson added a comment to D42139: Allow passing additional compiler/linker flags for the tests.

ping

Feb 19 2018, 10:55 AM
arichardson created D43475: [llvm-objcopy] Implement --only-keep-debug.
Feb 19 2018, 10:48 AM
arichardson created D43474: [llvm-objcopy] Use the full filename in --add-gnu-debuglink.
Feb 19 2018, 10:31 AM
arichardson committed rLLD325485: Rename DynamicReloc::getAddend() to computeAddend(). NFC.
Rename DynamicReloc::getAddend() to computeAddend(). NFC
Feb 19 2018, 3:05 AM
arichardson committed rL325485: Rename DynamicReloc::getAddend() to computeAddend(). NFC.
Rename DynamicReloc::getAddend() to computeAddend(). NFC
Feb 19 2018, 3:02 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Feb 19 2018, 3:02 AM

Feb 16 2018

arichardson updated the diff for D43161: Rename DynamicReloc::getAddend() to computeAddend(). NFC.

Addressed review comment

Feb 16 2018, 2:12 AM
arichardson committed rLLD325328: Ensure that Elf_Rel addends are always written for dynamic relocations.
Ensure that Elf_Rel addends are always written for dynamic relocations
Feb 16 2018, 2:04 AM
arichardson committed rL325328: Ensure that Elf_Rel addends are always written for dynamic relocations.
Ensure that Elf_Rel addends are always written for dynamic relocations
Feb 16 2018, 2:04 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Feb 16 2018, 2:04 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Feb 16 2018, 2:04 AM
arichardson added a comment to D31528: [ELF][MIPS] Multi-GOT implementation.

Thank you very much for updating this patch! I have just made the switch in CheriBSD to completely stop using ld.bfd and so far everything I have tested is working.

Feb 16 2018, 2:01 AM · lld

Feb 15 2018

arichardson updated the diff for D42843: Ensure that Elf_Rel addends are always written for dynamic relocations.
  • Updated comments to Rafael's suggestions
Feb 15 2018, 3:45 PM

Feb 14 2018

arichardson updated the diff for D42843: Ensure that Elf_Rel addends are always written for dynamic relocations.

Shrink patch even more to address only the issue in the test case

Feb 14 2018, 8:39 AM

Feb 12 2018

arichardson abandoned D43185: [MIPS] Mark .eh_frame as writable for PIC output.

Since this is not the correct solution I'll just keep this in our fork.

Feb 12 2018, 7:17 AM
arichardson added a comment to D43188: [ELF] Make .eh_frame relro if one of the inputs is SHF_WRITE.

As I said in the D43185, probably we need to implement something like _bfd_elf_eh_frame_section_offset from BFD library to convert absolute relocations into relative ones and resolve them at the time of linking.

Feb 12 2018, 7:01 AM
arichardson created D43188: [ELF] Make .eh_frame relro if one of the inputs is SHF_WRITE.
Feb 12 2018, 6:48 AM
arichardson added a comment to D43185: [MIPS] Mark .eh_frame as writable for PIC output.

The way it is currently it is emitting dynamic relocations into the .text segment. This needs -Wl,-z,notext with LLD but for BFD it will just emit those relocations anyway and (probably) crash at runtime.
At least now we are explicit that it requires a writable section (which will be in the relro section if you are using LLD).

Feb 12 2018, 6:23 AM
arichardson created D43185: [MIPS] Mark .eh_frame as writable for PIC output.
Feb 12 2018, 6:03 AM

Feb 10 2018

arichardson updated the diff for D42843: Ensure that Elf_Rel addends are always written for dynamic relocations.
  • Split out an unrelated change to D43161
  • made the diff smaller
Feb 10 2018, 10:22 AM
arichardson committed rLLD324821: Use RelType instead of uint32_t in DynamicReloc. NFC.
Use RelType instead of uint32_t in DynamicReloc. NFC
Feb 10 2018, 10:18 AM
arichardson created D43161: Rename DynamicReloc::getAddend() to computeAddend(). NFC.
Feb 10 2018, 10:17 AM
arichardson committed rL324821: Use RelType instead of uint32_t in DynamicReloc. NFC.
Use RelType instead of uint32_t in DynamicReloc. NFC
Feb 10 2018, 10:16 AM

Feb 9 2018

arichardson abandoned D42576: [test-suite] Add prototypes to functions in Olden and MiBench.

Okay I won't bother submitting further improvements that actually allow us to run the test suite without crashing.

Feb 9 2018, 9:31 AM
arichardson added inline comments to D42843: Ensure that Elf_Rel addends are always written for dynamic relocations.
Feb 9 2018, 6:44 AM