[PATCH] WIP: DI: Fold constant arguments into a single MDString

Duncan P. N. Exon Smith dexonsmith at apple.com
Tue Sep 16 10:12:37 PDT 2014


> On 2014-Sep-09, at 15:31, Adrian Prantl <aprantl at apple.com> wrote:
> 
> 
>> On Sep 9, 2014, at 3:04 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
>> 
>> 5. Do you have specific advice on automating the testcase update flow?
>>   My next step is building tool support, so suggestions (and starter
>>   scripts) are welcome.
>> 
>> <0001-DI-Fold-constant-arguments-into-a-single-MDString.patch>
> 
> Attached is the horrible, horrible Python script I used to perform the two-pass upgrade for http://reviews.llvm.org/D4919 / rdar://problem/17994491. Based from the experiences with that, using regexes to parse metadata actually works, but is not exactly recommended. Although all testcases were emitted by LLVM, they were emitted by different versions of it, so it is surprisingly hard to come up with generic enough regexes.

Awesome, thanks for sharing.

> If you wouldn’t have to also preserve all the comments in the testcases, you could alternatively hack the printInternal methods and AsmWriter to output the new format.

Not sure what you mean by this?

> Also note that it is often impossible to auto-upgrade any CHECK:-lines because they will often contain incomplete or otherwise ambiguous syntax.

Fortunately(?), from my initial testcase updates it looks like there
aren't very many of these.



More information about the llvm-commits mailing list