llvm-project/llgo/test/irgen
Andrew Wilkins f3718a9bf1 [llgo] irgen: generate switch instructions
Summary:
    With this patch, llgo uses ssautil.Switches
    to reconstitute (and synthesise) switches,
    which can then be lowered to lookup tables,
    trees, etc.

    We currently only handle integer const case
    switches. We erase the comparison blocks (other
    than the initial block), and generate a switch
    instruction at the end of the block starting
    the if-else-if chain. ssautil.Switches does
    not remove duplicate const cases (e.g. same
    operands for "||"), so we do this in llgo for
    now.

Test Plan: lit test added

Reviewers: pcc

Reviewed By: pcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6831

llvm-svn: 225433
2015-01-08 07:49:28 +00:00
..
Inputs
avoidload.go irgen: fix canAvoid* 2014-12-17 09:45:05 +00:00
cabi.go
go-panic.go irgen: do not emit an extra terminator for panic thunks 2014-12-28 22:39:01 +00:00
imports.go irgen: modify the ABI to use init guards instead of priority 2014-12-31 00:25:39 +00:00
mangling-dot.go
mangling-synthetic.go
select.go [llgo] Elide alloca for unused received values in select 2014-12-31 03:46:49 +00:00
switch.go [llgo] irgen: generate switch instructions 2015-01-08 07:49:28 +00:00